Hello.
I’m new to appium and this might be a simple issue that I might somehow overlooked or didn’t find a solution yet by searching the documentation.
I’m trying to automate an Android application, with JUnit as the test runner. My tests are structured into files that are containing @Before, @After and @Test.
public class LoginWithInvalidCredentials {
private AppiumDriver driver;
private String ValidEmail = "[email protected]";
private String InvalidPassword = "Qwerty@1";
@Before
public void setUp() throws Exception {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("deviceName", "AndroidTestDevice");
capabilities.setCapability("noReset","true");
capabilities.setCapability("fullReset","false");
driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
}
@After
public void tearDown() throws Exception {
driver.quit();
}
@Test
public void LoginWithInvalidCredentials() {`indent preformatted text by 4 spaces`
The suite is started by running a file that looks like this
@RunWith(Suite.class)
@Suite.SuiteClasses({
LoginWithInvalidCredentials.class, LoginWithInvalidMail.class, Login.class })
public class TestSuiteAll {
}
The thing that I want to solve is that each time a class is initiated the application is reinitiated / reinstalled again, making the time of the test execution to be long.
I want to know if there’s any method to make my class files run one after the other without reinitiate the application - because now they are checking things in the same screen - so I want to send keys on different scenarios and check some error message based on the scenario.
Thank you,
Alex