Hi,
I would like to share this topic to the TestPlant Team those who searching around ‘How to check boundary values/validations through EggPlant script’
The idea is to check the Boundary Values and Equivalent Class Partition on a text field and apparently, EggPlant is most successful to implement this scenario.
Here’s the story, for example, I’ve a specification - a text field called “No. of Items” only accepts Numbers and to maximum length 10 and minimum length 1.
Firstly, we need to create .txt file with permutations/combinations so that each every value will be checked by EggPlant.
So my .txt file looks like below –
1
1234567890
12 AB!@#
!@#$%^
!@ AB 12345
Asd12345
!@#ADG1234
AAS!@@#
Save this file into some folder - C:\Validations\Receiver
And the script would like this –
put “C:\Validations\Receiver.txt” into path
Repeat with each line of file path
set receiver to item 1 of it
put length (receiver) into here
If receiver is not a number
TypeText receiver
Log “Invalid entry”
else
If (here between 1 and 10) then
TypeText receiver
Log “Valid entry”
else
TypeText receiver
Log “Invalid entry”
end if
end if
end repeat
For more, please check - http://docs.testplant.com/?q=content/expressions