Retail:Developers Guide/How-to/Create a test with Test Creator
Introduction
In web POS we have to create automated test for each project and issues we develop or fix. We need to improve the way we create them to do it easier and faster. Test Creator functionality allow us to create a test just using Web POS UI as user do.
How to create steps for an Automated test
First of all, we need to enable preference Enable Test Creator to be able to see the menu entry of Start/End Test. Remember that if you have a no Manual Role you will see all menu entries.
To start recording the test, we need to open the menu and press Start test. All actions we do after this step will be recorded. Now, just go throw the UI and reproduce the steps you want to track and finally press Finish test menu entry. When we press that menu entry, steps are written in the browser console, see an example here:
_____________________TEST START_____________________
verifyUI("theButton_toolbarBtnCatalog", "BROWSE");
tapUI("theButton_toolbarBtnCatalog");
verifyUI("productTable_row1_identifier", "Avalanche transceiver");
tapCatProd("Avalanche transceiver");
verifyUI("btnTotalToPay_totalPrinter", "150.50");
tapUI("theButton_btnTotalToPay");
tapUI("paymentTabContent_exactButton");
verifyUI("paymentTabContent_doneButton", "Done");
tapUI("paymentTabContent_doneButton");
tapUI("menuHolder_mainMenuButton");
tapUI("menuHolder_btnContextMenu");
verifyUI("menuTest_lbl", "Finish test");
tapUI("menuScroller_menuTest");
tapUI("menuHolder_menu");
_____________________TEST END_____________________
Finally, you can create an automated test in the test repository and copy these lines and launch the test to be sure that is working fine.