New answers tagged

2

This shows how. "TestNG is used to enable parallel execution on runner level"


1

Yes, definitely we can write multiple methods with same priority but disadvantage of using this-There is no guarantee which method will run first, So- Instead of this,you can use 'dependsOnGroups' annotation from TestNG which you can easily perform stepwise operations. @Test(priority=1) public void Login() { System.out.println("LogIn Test code."); ...


1

Yes, you can write multiple methods with the same priority (quite similar to not use any priority - all methods has the same default priority). About dependsOn annotation in a few words: dependsOnMethods There is no guarantee on the order on which the methods depended upon will be run, but you are guaranteed that all these methods will be run ...


0

I have set up a similar utility using JUnit test cases. My framework used Groovy/Spock with listeners that reported results into a Couchbase DB. From there the tests were displayed on an AngularJS site which had the options to run either the selected test or run all test cases. I have posted the API portion of the code here which should not be overly ...


2

You do not need Eclipse, Jenkins, or TestNG to scrape a website. Ask a software developer to help you package Selenium, your Java code, and any other necessary resources into an executable Jar file. If you can't find any developers, try Googling for "executable Jar file". Your executable Jar file will require a main class. If you are accustomed to ...


1

With JUnit I have set up a web-based runner/control unit that allows the end user to access and run the tests. It is extremely primitive and it would run on the server instead of on their machine but here is the code that I used in order to achieve this: @Stateless @Path("test") class TestsService { @Context UriInfo ui; @GET ...


0

I think you have to use proper TestNg annotations sequence- Like this- @Parameters ({"username","password"}) @Test public void checkForParameters(String username, String password) { System.out.println("Username is :"+username+ " Password is: "+password); } It should works ......


0

There is several issues here. An implicit wait would do far better than the Thread.sleep() Using Xpath to search by id. Just use by.id() it will be far faster The ids, to me, appear to be dynamically created which will cause them to break. If the rest of the script works I would presume this is not the issue though. Use new ...


1

I would suggest not to use Thread.sleep() method, instead you can use the implicit wait, add following line of code after driver is declared. driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); and remove all Thread.sleep() methods from the code. Difference between implicit wait and Thread.sleep() is Thread.sleep() method will wait until ...



Top 50 recent answers are included