Answer the question
In order to leave comments, you need to log in
How to run a Linux java test?
I am writing tests (Selenium WebDriver + Java) on Windows.
Tests like these:
public void loginUser() throws Exception {
driver.get("http://my-site/login");
waitAssert.login(driver);
ElementsLoginPage.login(driver).sendKeys("[email protected]");
ElementsLoginPage.password(driver).sendKeys("qwerty");
ElementsLoginPage.submitButton(driver).click();
waitAssert.logoutButton(driver);
assertTrue(ElementsLoginPage.buttonLogout(driver).isDisplayed());
ElementsLoginPage.buttonLogout(driver).click();
}
Answer the question
In order to leave comments, you need to log in
JUnit, in theory, should also be on Linux. It can be run through the console and through the development environment
Judging by the above code, you are using the HtmlUnit driver, which is the default in Selenium.
So it does not affect the launch in the linux environment.
If the driver is different, please specify. If the graphic server is not installed on the linux machine, then you need headless drivers.
What build environment are you using in the project (ant/maven/gradle/...)?
If none, then I recommend using Gradle, it will be the fastest option for you.
And finally, running a java application on linux is no different from running on other operating systems.
How do you run your application on Windows?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question