Validation and Store Test Suite - Designer
Validation
This feature is to validate the request and Storeresponse Contentof the Appvance Designer script and validate the responses of the Appvance Designer script by adding assertions.
The steps to be followed to add assertions in ScenarioAppvance EditorDesigner is given below:
UseCreate validationan Appvance Designer script using Appvance Designer in IQ.
Create a Functional test scenario and storedsave contentit.
Run Editorthe Functional test needsscenario.
Navigate to captureController aand valuego fromto the applicationValidation suite tab and compareAdd itassertions.
Refresh the scenario and check if the assertion added is reflected appropriately.
Re-run the same scenario orwith execution.added Thisassertion keepsand validate if assertions are processed.
Create an Appvance Designer script using Appvance Designer in IQ
We will use the "Apple website" to create a sample Appvance Designer Script.
The Appvance Designer script with the recorded steps is shown below in the screenshot
Create a Functional test scenario and save it
Create a functional test scenario using the Appvance Designer script created in the above step and save the scenario. The screenshot is given below.
Run the Functional test scenario
Click the "Play Scenario" button and the scenario should run successfully (with at least a few steps).
Navigate to Controller and go to Assert suite tab and Add assertions
Once the test focusedis oncompleted businesssuccessfully. behaviorClick insteadthe Validation suite tab and from the drop-down select the assertion of fixedour screen text.choice
Common
uses
We will select the Assertion type as Assert Matches and add the assertion accordingly.
Where
The orderselect number,type accountwill value,allow token,the oruser confirmationto message.select from the Test case, Step and Request.
Test case Name is the name of the Test case that ais value displayed later matches the value generated earlier.
Step Name is the name of the step under which we will add the assertions
Request name is the name of the request for which we are adding an assertion
The matching string is the string we will be looking for
Target is the area in which assertions will be checked, * can be used for everything, Any regular expression can be used.
There are 3 types are targets
JSON: Target is the path
XML: Target is the Xpath
Text: Target is Regex
Refresh the scenario and check if the assertion added is reflected appropriately
After we add the assertions in the test flow.controller
Recommendedwe workflow
can Identifyview thestablesameelementinorScenarioresponseBuildervalue(SB) by Clicking on Save assertion. Once the assertion is saved User needs tocapture.Storerefresh thevalueScenario Builder page to see the changes. Users should navigate to the Assert suite tab of the Scenario Builder page. The screenshot of the below is shown below:
We will be saving the scenario and running it again and the test will fail since the request is set to false
The output from the controller is given below where it is failing.
Re-run the same scenario with
aaddedclearassertionnameandthatvalidatedescribesifitsassertionsbusinessaremeaning.UseprocessedNow the
storeduservaluechangesinthe assertions and makes sure the valid assertion is passed and re-runs the same scenario and the test should pass successfully since the valid assertion is passed. The screenshot of the controller with valid assertion processed as shown below
Different Formats and their targets:
We have three different formats
-
XML
JSON
TEXT
For Text, we need to use regular expressions as the target
For XML, we need to use xpath as a latertarget
For step.
The below example shows how to adeal largerwith suite.
We can use the indexes as shown below:
Make sure the Format is JSON for this particular test.
Similarly, we can do other assertions like:
Asset Exist
Assert Size
Assert Duration
Assert Checksum
Assert Response Codes
Last updated: SeptemberJune 18,26, 20262023
If you have any feedback on this topic, please contact us at documentation@appvance.ai