Good morning, We are currently testing the user role separation within our app. I have built a test script that checks that a user doesn’t have access to the configuration menu which requires admin rights. In one of the test steps, I look for the menu that should not be present, the result is a fail, can I revert this result to successful?
Yes, Checking the boundaries of your application is called ‘negative testing’. If you want ATS to return the result that your test script was successful when a step fails, because you want it to fail do the following:
Add a test step and select the action ‘Assert false’. Set the input parameter of the action to ‘True’, you can do this by double clicking the input field and clicking save this will set it to the default value of ‘True’.
Check the box ‘precondition’ in the same test step. Click open and select the action you want to use for asserting the widget. For example: the action ‘Find Widget’.
Enter the Widget Name of the widget you want to find in the input parameter of the precondition action.
When ATS finds the widget, the precondition will be successful; however, the ‘Assert False’ will fail because the result of the precondition is successful resulting in a failed test script.
When ATS does not find the widget, the precondition will fail and the ‘Assert False’ won’t be executed because the precondition failed resulting in a successful test script.