# Extend Testcases using Datadriver - PICT (more than 255)

**URL:** <https://forum.robotframework.org/t/extend-testcases-using-datadriver-pict-more-than-255/3363>\
**Category:** DataDriver\
**Created:** [2 March 2022 07:57 UTC](https://forum.robotframework.org/t/extend-testcases-using-datadriver-pict-more-than-255/3363 "2022-03-02T07:57:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flurin92](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/flurin92/32/1343_2.png) [@Flurin92](https://forum.robotframework.org/u/Flurin92)\
**Post date:** [2 March 2022 07:57 UTC](https://forum.robotframework.org/t/extend-testcases-using-datadriver-pict-more-than-255/3363/1 "2022-03-02T07:57:19Z")

</div>

I use PICT to generate my Data File. Unfortunately it generates a txt Data file which has only 255 lines.  
So I can only generate 255 Testcases.  
Is it possible to somehow extend the amount of Testcases?

---

<div class="post-metadata">

**Author:** ![René](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/ren%C3%A9/32/7_2.png) [@René](https://forum.robotframework.org/u/Ren%C3%A9)\
**Post date:** [2 March 2022 19:08 UTC](https://forum.robotframework.org/t/extend-testcases-using-datadriver-pict-more-than-255/3363/2 "2022-03-02T19:08:26Z")

</div>

there is not such a limit of 255 test cases per file.  
By default PICT just creates a “pairwise” combination.

That means every value is once tested with every other value, but not in every combination.

See DataDriver atests:  
[PICT EXAMPLES](https://github.com/Snooz82/robotframework-datadriver/tree/main/atest/TestCases/Defaults/PICT)

When you run that example, you will get 280 tests.  
When you change the `pict_options` to `pict_options=/o:4` you will get 847 test cases  
When you change it to `/o:5` you will even get 1769 test cases.

The option `/o` of pict tells you how many values shall be taken into unique combinations.

pict\_arg.pict

```python
Type: Single, Span, Stripe, Mirror, RAID-5
Size: 10, 100, 500, 1000, 5000, 10000, 40000
Format method: Quick, Slow
File system: FAT, FAT32, NTFS
Cluster size: 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536
Compression: On, Off

```

robot test cases:

```nohighlight
***Settings***
Library DataDriver pict_arg.pict pict_options=/o:3
Library Collections
Test Template Check Variables

***Variables***
@{COMBO}=

***Test Cases*** ${var_1} ${var_2}
${Type}_${Size}_${Format method}_${File system}_${Cluster size}_${Compression}

***Keywords***
Check Variables
    [Arguments] ${Type} ${Size} ${Format method} ${File system} ${Cluster size} ${Compression}
    ${comb}= Set Variable ${Type} ${Size} ${Format method} ${File system} ${Cluster size} ${Compression}
    IF $comb in $COMBO
        Fail "${comb}" is doubled...
    END
    Append To List ${COMBO} ${comb}

```

---

<div class="post-metadata">

**Author:** ![Flurin92](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/flurin92/32/1343_2.png) [@Flurin92](https://forum.robotframework.org/u/Flurin92)\
**Post date:** [3 March 2022 07:43 UTC](https://forum.robotframework.org/t/extend-testcases-using-datadriver-pict-more-than-255/3363/3 "2022-03-03T07:43:49Z")

</div>

Thanks for the fast reply. Ok then it seems not be a problem with the Testcase amount.  
To be more precise here is the script:

```
# Parameter Definition

ServiceID: 02, 04, 05, 06, 08, 0A, 0C
MethodID: 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 0A, 0B, 0C, 0D, 0E, 0F, 10, 11, 12, 13, 14, 15
expected_answer: 030000, 040000

# Constraints Definition
if 
(
[ServiceID] = "02" and [MethodID] in {"01", "02", "03"}
or
[ServiceID] = "04" and [MethodID] in {"01", "02", "03", "04", "05", "0C", "0D", "11", "12"}
or
[ServiceID] = "05" and [MethodID] in {"04", "06", "0E", "0F", "10", "11", "12", "13", "14", "15"}
or
[ServiceID] = "06" and [MethodID] in {"04", "0A", "0B", "0C", "0D", "0E", "0F", "10"}
or
[ServiceID] = "08" and [MethodID] in {"0B", "0E"}
or
[ServiceID] = "0A" and [MethodID] in {"01", "02", "05", "06", "07", "08", "0A", "0B"}
or
[ServiceID] = "0C" and [MethodID] in {"01", "02", "04", "06", "07", "09", "0A", "0B"}
) 
then [expected_answer] = 030000 else [expected_answer] = 040000;

```

I want to test every ServiceID against every MethodID and I expect for some MethodIDs-ServiceID combinations the answer 030000.  
This script like it is works but if I want to add just one more value to the MethodIDs e.g. “16” it does not work anymore.

---

<div class="post-metadata">

**Author:** ![René](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/ren%C3%A9/32/7_2.png) [@René](https://forum.robotframework.org/u/Ren%C3%A9)\
**Post date:** [11 March 2022 06:50 UTC](https://forum.robotframework.org/t/extend-testcases-using-datadriver-pict-more-than-255/3363/4 "2022-03-11T06:50:49Z")

</div>

Ok. That question you have to ask the developers of pict, which is Microsoft…
