increment - incremental value
Returns a value that increments by 1 with each iteration.
The start parameter can be set as a starting point.
This can be used to give unique numbers to for example test cases.
Usage(s)
increment () |
Returns an incremental value starting at 1. |
increment ( $start ) |
Returns an incremental value starting at $start. |
Parameter(s)
$start |
The initial value to start the incremental value from.
$start must be an integer. |
Example(s)
Incrementing values (start at 1)
increment(1000) x 20 iterations returns:
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
|
Using the increment value to number your automated test cases
TCincrement();fname();lname()
TC1;Gentiana;Cereghetti
TC2;Ingrid;Vukovic
TC3;Ingrid;Mulder
TC4;Ni;Armas
TC5;Alice;Lehtonen
TC6;Mattia;Ferhatovic
TC7;Valeria;Johannesen
TC8;Gogo;Ricci
TC9;Chloé;Athanasiadis
TC10;Isabella;Mayer
TC11;Lucy;Mulder
TC12;Christina;Clarke
TC13;Dan;Cabrera
TC14;Hans;Dubois
TC15;Megan;Rrahmani
TC16;Fatemeh;Mattila
TC17;Aoife;Radic
TC18;Amina;Vázquez
TC19;María;Salminen
TC20;Hana;Sokolov
|
See also
list - custom list
range - range of numbers