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

0
votes
3answers
59 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
35 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 ...
1
vote
1answer
348 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(...
0
votes
0answers
9 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
16 views

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

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?
0
votes
2answers
117 views

Export list of testNG tests within a project/suite?

I have a selenium framework in combination with TestNG. Is it possible to export a list of all test names are their associated descriptions?
0
votes
2answers
51 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
56 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.
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 ...
0
votes
2answers
3k views

Can I force a Jenkins job to report a successful TestNG test even when the suite has failures?

Can I force a Jenkins job to report a successful TestNG test even when the suite has failures? I have a test suite with 100 tests and I want to report a success in Jenkins if there are 3 or fewer ...
0
votes
2answers
60 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
1answer
258 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: ...
0
votes
1answer
80 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
3answers
138 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(...
2
votes
2answers
66 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("...
1
vote
2answers
81 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"...
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 ...
0
votes
2answers
56 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
3answers
684 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 ...
2
votes
1answer
461 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 ...
0
votes
2answers
3k views

Setting TestNG test case result as PASS/FAIL as per my requirement

I have one requirement, I need to read the test data from the excel sheet and after the test case execution I need to write in to excel sheet as PASS/Fail/ Skip. I have used TestNG framework,Below ...
0
votes
1answer
53 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....
0
votes
1answer
41 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\\...
3
votes
1answer
117 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 ...
-1
votes
0answers
14 views

Email custom report pass fail as a single line message

I want to send pass and fail results in email as a single line message and attached the Custom report to the email. If somebody wants to see the report they can open the attachment if not they can see ...
2
votes
3answers
104 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 ...
0
votes
1answer
35 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
67 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"?&...
-1
votes
2answers
103 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 ...
0
votes
0answers
22 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
141 views

What is the difference between jUnit & TestNG?

I want to know difference between Junit & TestNG. Which one is useful for Tester?
0
votes
0answers
21 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
33 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(...
0
votes
1answer
182 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 ...
2
votes
1answer
70 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
0answers
382 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.
1
vote
2answers
77 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
2answers
60 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
83 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 ...
0
votes
5answers
431 views

How to revert the changes made by selenium in a tear down process?

I am in a situation where I have to revert all the changes which I made while testing the application. Is there any way of doing this in Testng? Suppose if I have added something into the ...
1
vote
2answers
152 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
159 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 ...
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 ...
1
vote
1answer
56 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. &...
0
votes
2answers
321 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....
2
votes
3answers
2k 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
1answer
134 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 ...
1
vote
2answers
141 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 ...
0
votes
2answers
200 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 ...
1
vote
2answers
103 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(...