Issue
I'm testing this website:
public static void main(String[] args) {
WebDriver firefox = new FirefoxDriver();
firefox.get("http://test.naimi.me");
WebElement row = firefox.findElement(By.className("row"));
WebElement navigationPane =
firefox.findElement(By.xpath("//nav[contains(@nav,'nav')]"));
WebElement billboard = firefox.findElement(By.id("billboard")) ;
if(billboard != null) System.out.println("good bilboard") ;
I have some Java test code to check if elements loaded after opening the main page. How do I make it run automatically? and on what server/software? Maybe cloud?
Solution
Here's my way: TestNG + Selenium-Grid + Jenkins CI.
TestNG is a test framework which is designed to cover all categories of tests: unit, functional, end-to-end, integration, etc...
Selenium-Grid allows you to :
- scale by distributing tests on several machines ( parallel execution )
- manage multiple environments from a central point, making it easy to run the tests against a vast combination of browsers / OS.
- minimize the maintenance time for the grid by allowing you to implement custom hooks to leverage virtual infrastructure for instance.
Jenkins CI is the leading open-source continuous integration server, which could be used to run your tests automatically and continuously.
Answered By - user2432405
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.