|
Problem Description
This example combines several evalid functions to provide a script that checks out
the results from a search engine, using a "fuzz test" approach.
The example here involves these key steps:
Example Passages
Here is a step by step illustration of how this was done using eValid components.
# eValid Script File contents... ... Lock Delay 250 eVgenRand "script.evt" "table.data" N ... |
This command applies the eV.Generate random sequence generation process to the script.evt file, using the data in the table.data file, to produce the script.evs file. eValid then repeats this process N times (e.g. N = 10).
The Lock command gives this instance of eValid exclusive access to the machine, and the assumption is that the first line of the script.evt file will have the following:
# eValid Script Template contents... ... UnLock ... |
This assures that the eV.Generate process will run exclusively on the machine. The 250 msec delay (Delay 250) is included to allow the machine sufficient time to engage the Lock which will be disengaged when the script generation is completed and starts to run.
# eValid Template file "script.evt" contents... ... InputValue 0 123 "" "emailin" "{% let}{% let}{% let}{% let}@domain.com" "name:frame" ... |
Here the values that are chosen at random for the {% let} strings by eV.Generate are drawn from the value table that contains a line that looks like the following:
# eValid Value Table contents... ... let a b c d e f g h i j k l m n o p q r s t u v w x y z ... |
The extraction is done this way:
# eValid Template file "script.evt" ... IndexSet 0 IndexFindElement 0 DOWN "name" "emailin" "name:frame" ValueGetElement 0 "Value" "name:frame" ... |
The earlier-generated email string value is now stored in elementValue.
# eValid Template file "script.evt" ... IndexSet 0 IndexFindElement 0 DOWN "name" "emailconfirm" "name:frame" ValuePutElement 0 "Value" "name:frame" ... |
This puts the same email value that was previously put into the emailin field also into the emailconfirm field.