简体   繁体   中英

How to divide test cases effectively to automate them in a mobile app using appium

I'm trying to automate test cases of an app containing about 5 big sections I have a lot of test cases more that 100 in each one What is the best way to divide test cases in order to automate them? I create separate 5 classes, and in each one i put all tests ?

For now i'm writing my test cases using dependence like the following example

    @Test(dependsOnMethods = { "method1" })
    public void method2() {
        System.out.println("This is method 2");
    }

But my problem if there is no methods dependence how should i proceed in order to make all tests cases executed automatically ?

As I answered your another question, you can always use Page Object Pattern to make your easier to read and what is the most important easier to fix, when it will be needed. Then, if needed you could change the variables in one place - not everywhere.

Regarding your question about using annotations considering different class usage and methods inside them, please check below example:

@Test
public void checkSampleScreen() throws InterruptedException{

    SampleScreen ss = new SampleScreen(driver);
    ss.launchStartScreen();
    }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM