API methods are developed to work with mobile application automation (i.e. Android and IOS), the methods are written is such a way that, while reading the methods you can understand the code what is written. Once you write the automation code, you can read like manual test cases. A manual tester can also understand easily what written in the automation script by reading it.
You can use XPATH,ID,Class Name,Name and UiSelector to identify the element in the Android application. And IOS will support XPATH,ID and Name to identify the element.
These methods are same for Android and IOS. No need to change the method names or syntax. But to work with mobile applications need to use the small 's' to call the methods.
You can simply validate the test cases using assertions. The assertions are made in such a way that by using single line of code, you can assert the element exist or not, expected string is present or not, expected conditions for true or false etc… If the assertions fails it will log the failure into the reports.
You can log the messages while executing the test suite. Used Log4j/Log4net to generate the logs. By using log you can track the execution flow of your scripts. Once after completing the execution of the test suite, we can analyse the logs for the execution flow for which steps are executed perfectly and where is the break in the flow.
To perform the data driven testing, you can use the Excel read and write methods. To read the test data from the excel sheet and once the completion of the execution write the test results back to the excel, we can use the read write methods.
Sakinalium integrated with Extent Reports, Extent Reports are third party HTML reports. You just execute your suite and see the generated reports for the status of the tests.
To generate the reports, you need to call two methods called StartTest() and it should be the first line in every test method, GenerateReport() and it should be called after each test method execution. That is it, now you can start writing the automation scripts and generate the HTML Reports
Once the completion of your test suite execution. It will generate Report.html in the project folder.