TestNG is a testing framework, inspired by the JUnit/NUnit unit testing frameworks. TestNG is intended to support more than just unit testing, allowing functional, end-to-end, integration, etc.

learn more… | top users | synonyms

7
votes
1answer
4k views

Automated tests pass every time when run individually, but when they are clumped into a test suite it's a toss up if the tests will pass

I have around 200 test classes for my web application at the moment. I use Selenium2/Webdriver and the tests are written in java, with TestNG used as my framework. When I run each test by itself, ...
5
votes
1answer
2k views

How do I verify a Link URL using Selenium Webdriver / TestNG?

I'm trying to do an assert to make sure a correct XMLHttpRequest is made. I know that I can get the exact Request URL from the Developers Console -> Network tab -> XHR tab's general information ...
5
votes
2answers
3k views

How and where to store dynamic result/data using webdriver java

I want to know "How and where to store dynamic (Search results) result/data", I am getting the results and not sure what to do next. Also, after saving these results I want to use this in another ...
4
votes
2answers
201 views

What is the difference between jUnit & TestNG?

I want to know difference between Junit & TestNG. Which one is useful for Tester?
4
votes
1answer
1k views

What is the max number of threads allowed for running TestNG tests in parallel?

I’m trying to run TestNG tests in parallel, right now I’ve set “parallel=tests” & ‘thread-count=25’ but I see that only 10 threads are running at a time. Is this testNG’s thread limit? Is there ...
4
votes
3answers
586 views

Page Object Model or External property file for Selenium Object Repository

I am a beginner in Selenium WebDriver (Java with TestNg). I'm trying to create a framework of my own. My question here is what would be the better option to store my objects (basically all the ...
4
votes
4answers
5k views

IE not executing test case properly in selenium webdriver

I am running test cases on firefox and chrome browsers, it worked fine for me using selenium webdriver.But when it comes to using IE versions(9-11), i am getting below mentioned error messages : 1....
4
votes
1answer
133 views

Can I execute selenium test cases in a real browser with Jenkins Selenium and Maven

I am working on selenium project with Jenkins + Maven + Selenium + TestNG I am following few questions. Can I execute selenium test cases in Jenkins by launching browsers? Currently it gets ...
3
votes
3answers
117 views

How To Handle Dynamic Changing IDs In XPath?

Example : //div[@id='post-body-3647323225296998740']/div[1]/form[1]/input[1] In this XPath id "3647323225296998740" Is changing every time when reloading the page. How to handle this type of ...
3
votes
2answers
3k views

Difference between Selenium and TestNG

Am a beginner in Selenium and am trying to learn selenium on my own by googling. One thing which I noticed was in many of the posts which I read about selenium the name of the framework by name "...
3
votes
2answers
79 views

Which test execution framework for Java has the highest test coverage?

I found TestNG failing occasionally and when I started to investigate I found it has little test coverage. It looks like the test framework itself is poorly tested. Which other test execution ...
3
votes
2answers
251 views

Is there any test result reporting tool for TestNG & Selenium WebDriver with Java?

I am using TestNG and Selenium webdriver via Java. Is there any tool that can help generate detailed test results, for example, suppose I have a test case that fails more often than not, is there a ...
3
votes
2answers
87 views

How to locate an element which is inside the iframe?

I'm new to automation testing (I'm using TestNG framework and Java language) I'm having trouble in locating an element which is inside iframe. WebElement iframeSwitch= driver.findElement(By.id("...
3
votes
1answer
4k views

Selenium webdriver - Java with Webservices

In our application we are using web-services and DB, is it possible to integrate Selenium webdriver with web-services (Soap UI)? If two different frameworks are integrated, whether this is good?. My ...
2
votes
1answer
92 views

Is Parallel Testing possible in Cucumber with TestNG?

I am trying to implement Cucumber-JVM with testNG and I need to execute the scripts in parallel with multiple browsers. Is Parallel Testing possible in Cucumber? If Yes, Can any one help me on this?
2
votes
2answers
434 views

Error: cannot find symbol in XSLT + TestNG Report

When I followed this link LINK to generate XSLT Report Using testng and to send email reports getting error message (Ex: package org.openqa.seleni um does not exist, etc...0). Please suggest me. ...
2
votes
2answers
237 views

Should test cleanup happen in each individual test method or in a general test cleanup?

For example, let's say I have these tests: test1() { signIn(); // Do some testing signOut(); } test2() { signIn(); // Do some testing signOut(); } Would it be better to ...
2
votes
2answers
3k views

How to verify whether selected item is exist in another page? (Ecommerce application)

I am trying to verify selected item is exists in another (Cart/Shopping Bag) page, for EX: I am buying one/many items from application and then I will move all the items to Cart/Shopping Bag, here I ...
2
votes
2answers
190 views

How to run multiple Test cases on different browsers in TestNG with Java

I'm new at TestNG. So, I want to know more details about how to run multiple test-cases on different browsers. Which Framework model should I use in my project? So that each & every part of my ...
2
votes
3answers
3k views

Cannot Instantiate class error - Selenium WebDriver

I am facing this 'Cannot insantiate class' error on running one of my test cases in Selenium webdriver using Java. Below is the class of the functionality of the test, package Pages; import java....
2
votes
3answers
158 views

How to add @parameter annotation for TestNG in Eclipse

I'm trying to do parameterization for TestNG in Eclipse but the annotation @parameter is not being shown. How to add @parameter annotation for TestNG in eclipse?
2
votes
1answer
4k views

How to run multiple browser instance with Webdriver, Java, and Junit/TestNG?

I have a test ready to be executed but it takes a long time to finish. In this test I'm feeding in csv data, so basically the whole test will run 56 times. I was wondering if there's anyway I could ...
2
votes
1answer
168 views

The jenkins build fails when any testng test case fails. How to make it so that the build succeeds when all test-cases are run regardless of result? [closed]

In my Test Automation, when we execute the TestNg Suite XML then whenever any test case fails the Jenkins Build also fails. But I require that the TestNG report shows the proper result, either Pass ...
2
votes
1answer
532 views

Running failed test cases in TestNG

I have a suite which consists of 2 test cases. When I run this suite, the results should be 1 passed and 1 failed. When I am trying to run the failed test cases through TestNG-failed.xml file, it is ...
2
votes
0answers
392 views

Selenium Webdriver and OpenLayers

I would like to check that the locations asset on map (openLayer) are the same with some asset in a row. What is the best way to do this? I'm using the TestNG framework.
2
votes
0answers
772 views

How to report test execution method when using @Factory in TestNG?

I am using @Factory annotation from TestNG to create tests dynamically. It will read a property file that contains the list of test cases to be executed and return them. @Factory public Object[] dp()...
1
vote
2answers
42 views

Running TestNG XML from another project

Is it possible to run a testNG XML from java code, in a separate java project with the given path to the XML?
1
vote
2answers
158 views

Logging every action with custom “debug” method. Good idea?

I'm creating my first full framework using Selenium and TestNG and recently implemented the ability to have logging enabled which will track every action (before and after). public class CustomLogs { ...
1
vote
2answers
93 views

Effective way to deliver automation script to client?

I am QA automation engineer. We have so many clients for whom we are doing web scraping. We automate their daily task to save their time and resource. Every client demands that they should able to ...
1
vote
2answers
2k views

How can I ensure testNG test method does not abort if any assert fails

I know there is a difference between assert and verify in Junit; the assert results in a runtime exception, causing test method execution to abort. To overcome this problem, we can have verify which ...
1
vote
3answers
4k views

Using multiple instances of webDriver

I have defined an object of Web driver in one class as Static WebDriver driver; and want to use that instance in another class to automate the browser. Is it possible? Or will I have to define ...
1
vote
3answers
9k views

Running WebDriver tests in parallel using testng.xml

I'm trying to run WebDriver tests in parallel using testng.xml. I'm able to run testng tests in parallel by using parameter parallel="tests" but running with following paramters, "methods", "classes" ...
1
vote
2answers
101 views

What is the difference between Priority and Depends on Method in TestNG?

I am lagging behind to understand the concept of dependsOnMethods and priority. I googled but I didn't get enough info about this. A one line answer will be greatly appreciated. Can we write multiple ...
1
vote
1answer
64 views

verify element padding using Galen Framework

I am in process of evaluating Galen as UI automation framework. I am blocked at one point where Galen is unable to give correct results in case of padding around an element. This is the sample DOM. &...
1
vote
1answer
175 views

Parameters with DataProviders

Is there any way to use Parameters with DataProvider together in Selenium ? @Parameters({"safaf"}) @DataProvider(name="sss") public void hhhhh (String safaf){ }
1
vote
1answer
1k views

TestNG vs Robot Framework - pros and cons

What are the pros and cons of using Robot Framework with selenium2Library (webdriver). Which one is the better option for web application testing - TestNG or Robot Framework?
1
vote
2answers
157 views

Class Under Test vs Object Under Test

What is the difference between Class Under Test (CUT) and Object Under Test (OUT)? CUT is used to test a class and OUT is used to test an object. — I'm unable to find any difference ...
1
vote
2answers
111 views

TestNG + java. Difference between Assert.assertTrue and Assertion?

I'm a little bit confused in testNG assertion methods. My question is simple - is there any difference between Assert.assertTrue and Assertion? I mean difference between following: Assert.assertTrue(...
1
vote
1answer
487 views

TestNG - how to share same browser session between two methods?

I am writing TestNG code for the below scenario and do not know how to share browser session between two methods: 1. Creating a data driven testNG suite to login using 10 different usernames I need ...
1
vote
1answer
526 views

TestNg not executes @BeforeGroup if the method is in another class

My code structure is like this: I have four classes having ten tests and one @BeforeClass method to run before any of the tests. In each of four classes all tests are of one single group. And I have ...
1
vote
2answers
72 views

Element is currently not visible" random text fields

I am getting this error "Element is currently not visible" when I try to input into textbox which is visible I've created a script to signup and I am getting this error randomly sometimes on "password"...
1
vote
2answers
91 views

@Parameters getting Skipped, just basic tests

Here is my testng.xml: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > <suite name="com.mycompany.app_maven-project_jar_1.0-SNAPSHOT"...
1
vote
1answer
114 views

Logging in Firefox on same portal with different Credentials using TestNG Data provider and Selenium

import java.util.concurrent.TimeUnit; import org.openqa.selenium.*; import org.openqa.selenium.firefox.FirefoxDriver; import org.testng.Assert; import org.testng.annotations.AfterSuite; import org....
1
vote
1answer
194 views

Can I email the testNG reports directly through selenium?

I want to send the testNG reports directly through mail to the stakeholders once its complete execution. What is the best possible way for it?
1
vote
1answer
395 views

How to click on element only if data exists in excel table? [closed]

Hi so currently I'm working with Selenium webdriver in Eclipse.. I'm testing a web app and having data driven from an excel sheet. There is optional information and you can click 'ADD' and then a pop ...
1
vote
3answers
4k views

How to run TestNG failed test cases in Jenkins for Maven project?

I am new to Jenkins and I have configured it on my Windows PC. I have to run failed test cases twice before considering that they are failing. I am using TestNG and Selenium Webdriver for writing test ...
1
vote
1answer
4k views

How to modify testNG report in selenium java

I am running my script in java and getting the results in testNG. But in my application after filling up the form I am getting a confirmation alert message. I am able to read that alert message and ...
1
vote
1answer
314 views

how to print currency symbols using webdriver with testng

In Dropdown currencies are listed as($,€,₤). Based on the selected currency, prices will display in other page like ($10,€10,₤10). Using the below code, I got the selected value from the dropdown. ...
1
vote
2answers
48 views

How does TestNG influence on project performance?

The task is to measure changes in performance of a system during daytime execution. Test system description Tests are performed on java desktop application which is started with cmd command: java -...
1
vote
3answers
95 views

Unable to locate element throwing a org.openqa.selenium.NoSuchElementException in TestNG

Am unable to click on element after executing a First test second test showing a org.openqa.selenium.NoSuchElementException . My code Here: public class snapooh { WebDriver driver; @BeforeTest ...