ATS test setup

1
Hi Team, I am trying to do a setup for running the ATS script. The requirement is that as part of the the initial script run i need to check if the record is existing or not. If existing then should delete those record else if its not present then also the setup should be completed without error. I tried below steps as in the attached screen shot but when record is not found its showing error.So my requirement is that the setup should continued as success.
asked
2 answers
2

Hi Ragendth,

That's actually pretty easy to do. All that you need to do is add a precondition to steps 7, 8 and 9 of type “Find/Assert Datagrid Row” and fill in the same values for Widget Name, Column (1) Name and Column (1) Value as you have in your current step 7. What will happen is that if the precondition is not met (i.e. ATS cannot find your widget/column/value combination), the step of which the precondition is part will be skipped, so your test case will not fail.

You can either do this as explained above, as you would want to skip clicking the row, the delete button and the confirmation button, OR (better option) you extract steps 7-9 into an extracted action, and add the precondition to that action only. Saves you some work and possible maintenance!

Please let me know if you get this working.

Best regards,

Joris van der Heijden
ATS Consultant @ Mansystems
 

answered
1

This can be done using Preconditions. In your click step use a precodnition function “Find/Assert  DataGrid Row”.

A step by step how to is available here – https://docs.mendix.com/ats/howtos/ht-version-2/use-precondition-in-test-cases-2

Hope this helps,

Andrej

answered