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

1
vote
2answers
51 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
2answers
45 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?
0
votes
0answers
14 views

Cannot instantiate class openbrowser.Openfirefox

Below is my class file : package openbrowser; import org.testng.Assert; import org.testng.annotations.*; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa....
0
votes
1answer
50 views

Tools for Data Driven and Keyword driven tests in selenium with python?

I am new to selenium and python, I was watching some videos on data driven and keyword driven tests, the instructor was using TestNG with selenium and I was wondering are there any tools similar to ...
0
votes
1answer
19 views

can we create a software application for the full script of selenium coding we have done? [closed]

If we have created some selenium code for web application testing. After completion of the script coding, can we create a java application or something like that?
1
vote
3answers
106 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 ...
0
votes
1answer
53 views

How to open messaging app during one android app test case is running to fetch otp

How do I open messaging app when test case is running for any other app. Need to fetch OTP from messaging app during a test case is running for my android app. I have tried to create new instance ...
0
votes
1answer
40 views

Is use of priority in TestNG a good approach? [closed]

I'm assigning priority to each test method in a specific class under my automation project. My senior reviewed the script I wrote and mentioned to me that do not use priority instead use the xml to ...
0
votes
2answers
62 views

Parallel Testing with Selenium Grid - Static classes have driver issues

I am currently working on an automation project. I have the project itself complete. However, I am now integrating Selenium Grid into my project to run my tests parallel on different browsers e.g (...
0
votes
2answers
89 views

If a test case fails, how to close the browser and move to the next one?

How can i stop the execution of a test case if an exception happen and caught and move to next one. I am using TestNG, Eclipse, Selenium. In my xml, i have: <?xml version="1.0" encoding="UTF-8"?&...
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("...
0
votes
0answers
24 views

Does it require to install all necessary software for slave in jenkins

I have built automation script and everything working perfectly. Now client want to run same script from his location. I am thinking to set his computer as slave in jenkins , but does it require to ...
4
votes
2answers
211 views

What is the difference between jUnit & TestNG?

I want to know difference between Junit & TestNG. Which one is useful for Tester?
0
votes
2answers
109 views

Cucumber and TestNG integration

I have a simple question as I am just getting into Test Automation. I want to develop Cucumber smoke tests and acceptance tests as they would be easy to read and understand for my colleagues. ...
0
votes
0answers
25 views

Selenium script is failing from Jenkins

I have selenium framework with TestNG. When i run my script from eclipse it works fine, but when i run the script form Jenkins the build is failing. I am new to Jenkins. Not sure what i am missing. ...
0
votes
0answers
55 views

Import TestNG results from Jenkins to ALM

I have Jenkins on localhost, configured test project, which is generating passed test: @Test public void aFastTest() { System.out.println("---- ---- ----"); Assert.assertTrue(...
3
votes
3answers
121 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 ...
1
vote
2answers
108 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 ...
2
votes
1answer
93 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?
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
73 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"...
0
votes
1answer
64 views

How to scroll in html table of webpage?

A web page is showing a table of the first 10 data items out of 150. I want to scroll that table until the element is found. How can I achieve this? I refereed this question http://stackoverflow....
2
votes
2answers
192 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 ...
0
votes
3answers
155 views

how to run failed testcases using TestNG?

I created jar when i run on command prompt i am able to see result, what i want is "i need to run failed test cases if there is any" public class DemoProjectClass { public static void main(...
1
vote
1answer
66 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. &...
2
votes
1answer
172 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 ...
0
votes
1answer
94 views

How can I execute selected test cases from list of testcases in TestNG at runtime?

I want to create a page with the details of test cases (say a HTML Page with some content). Say the testcases will be listed there. When i want to run the test cases then I will select them and click ...
0
votes
2answers
257 views

TestNG showing as test passed even if assertion fails

I use below Java code to check if test fails @Test public void myMethod(){ .. .. Assert.assertEquals(condition1,condition2); }catch(AssertionError e){ e.printStackTrace(); } Even if condition1 and ...
0
votes
0answers
23 views

testNG email report display in outlook 2013

I am facing one problem about the testNG report display in outlook. I did some changes to the report displaying format before sent out. Look at the display in outlook 2013 client: Look the display ...
1
vote
2answers
159 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 { ...
0
votes
1answer
56 views

Required parameters but none were supplied error

Can someone help me on how to fix the error and run the script? public class ExcelCapture { public WebDriver driver; String filePath = "E:\\Study\\workspace\\OCM25_26_OCE_19\\OCM25_26_OCE_19\\...
4
votes
1answer
134 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 ...
0
votes
1answer
289 views

How to Fail Test case based on condition in TestNG Report

I am using TestNG and having one issue. Test Case : I am checking validation message that if user leave email id blank & Click on Login , System should fire message "Please Enter Valid Email". I ...
0
votes
2answers
34 views

Test methods executed which is are mentioned in test suite xml

I have an issue while executing a test suite. Some of the test methods are automatically executed even though they are not specified in test suite. I am using TestNG + WebDriver Here I have two test ...
1
vote
1answer
55 views

Difference between Hamcrest-library jar and Hamcrest-all jar

What is the difference between using the hamcrest-library-1.3.jar that comes bundled with Selenium Webdriver (I use v2.49) and hamcrest-all-1.3.jar found on the official website of Hamcrest https://...
0
votes
3answers
67 views

Assert in TestNG (Actual int value, Expected int value)

Is there anyway to assert that, actual int value = expected int value not equal to 0 Something like, Assert.assertEquals(length, 0);
0
votes
1answer
61 views

Test Scenario for cookies in selenium webdriver

I want to work with cookies in my project, I don't know what will be the Test Scenario and Test Cases for it. Please help.
3
votes
2answers
80 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 ...
0
votes
3answers
199 views

How to run multiple test cases without running before and after class again and again

I want to know how run multiple files without running the before class() again and again. E.g.: Consider i am writing test case for GMail login.java : Which contains complete testing of the login ...
0
votes
2answers
435 views

TestNG.java.lang.NullPointerException running second @Test

It runs first test, but then I'm getting null pointer exception when running Edit Profile test. Not sure why. I globally declared public driver. Please help. Thanks package test; import java.util....
-1
votes
2answers
111 views

How should look test in webdriver with different Test scenario

I have to test demo.opencart.com. Here is my scenario: Test scenario: 1 Open browser and go to Democart 2 Change currency to GBP (top left dropdown) 3 Search for “iPod” using text search 4 Add ...
3
votes
2answers
256 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 ...
0
votes
0answers
55 views

How to run all the tests in various classes of testng test suite with an executable jar file

I have a project in which there are multiple classes and in each class there are various tests. I have created a testng.xml which i run from eclipse and it is successfully running the tests one by one....
1
vote
2answers
277 views

How to skip failed test cases using TestNG

How to Skip the failed test cases and to execute the remaining test cases when using Selenium, Java and TestNG.
1
vote
0answers
64 views

TestNG reports email after test executions

I've found various links for sending TestNG reports to be emailed after test executions here are two of the links https://loganathan1988.wordpress.com/2014/11/03/how-to-email-automated-test-execution-...
0
votes
1answer
311 views

How to integrate Jbehave and TestNG?

I googled and found most of scripts were written in Jbehave with junit. But I'm trying to integrate Jbehave with testNG framework. And the following were I tried so far. Feature file: Scenario: ...
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 ...
1
vote
2answers
92 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"...
0
votes
3answers
900 views

Get Text of a WebElement

I'm learning selenium and writting automation script for this website http://store.demoqa.com/products-page/your-account/ I'm trying to get value of the error message, I identified Error Message ...
1
vote
1answer
374 views

Appium: How to get adb logcat for multiple android devices

I have to execute my test on more then one device. So how to get logcat for every device? My current code is: List logEntries = driver.manage().logs().get("logcat").getAll(); File logFile = new File(...