I am using appium 1.4.13 and node js client to write tests for android and ios.
I am looking for a way to make my tests independent of each other. Right now, if the test fails, on ios it goes to home screen and closes the simulator and all my subsequent tests are failing. I want to somehow handle the test failure so that even if one test fails, it does not affect the next test in the process.
I have thought of again launching the app if the test fails but its opening the simulator and the app from the scratch which is not helpful.
Anyone knows how to achieve this thing with appium?
First, this is not an Appium problem, it is a testing framework problem. Your problem is that you are not using a testing framework. A testing framework will allow you to identify tests, give you enhanced logging/reporting, and above all give you a way to fail a test without stopping the test runs. I did a quick google search which you can reference here:
I’ve given this a lot of thought but personally haven’t found any good way to overcome the flakiness of the iOS tests. I tend to think that it’s due to relative youth of the platform and I hope this will only get better with time and with more smart developers.Right now, it’s pretty stressful, to say the least
Thanks a lot for your reply. Yes, I agree with you regarding use of test framework. I did not mention about the test framework which I am using. I am using mocha framework for running appium tests and I dont know how to handle test failure. I can identify tests , get logging/reporting but do not have an idea on how to fail a test without stopping test runs.
The workaround I am thinking is changing the way I am writing my tests, I am thinking to start every test from the same point in the app and then executing it from that point.