Questions tagged [testng-eclipse]

1

votes
1

answer
1.2k

Views

how to customize TestNG report result with json format

I am working with TestNG and selenium webdriver java. I want to make a output report in json format, can testng make a report with json format?Please suggest me a example for this issue.
beginerdeveloper
1

votes
0

answer
107

Views

Unable to return Object[] from DataProvider

I tried returning a single dimensional Object[] from dataProvider and it worked for me. But the same code is not working in my office environment.What would be the issue? I am using TestNG 6.13.1 @DataProvider(name = 'Data') public Object[] dataProvider() throws BiffException, IOException { jxl.set...
Varun Joshi
1

votes
0

answer
43

Views

Testng eclipse remote debugging?

I am able to debug testng when the code is in my local box and I build it on my localhost box with the simulator. I am trying to see if there is any way I can debug testng by adding debug points in eclipse giving a remote build . (Eg: like remote java application debug).
user2868864
1

votes
0

answer
311

Views

Tool Tip error in Eclipse Kepler after TestNG installation

My projects in Eclipse Kepler were working just fine until I downloaded TestNG. Post TestNG download, I am unable to click on the run button for my code. After I click on run or even if I hover over on run the following error message is displayed. An internal error occurred during: 'Compute launch b...
Anjana Madhavan
1

votes
2

answer
166

Views

Unable to execute Suite in Parallel Mode

XML code: Java code: package Crossbrowser; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.edge.EdgeDriver; import org.openqa.s...
koushick
1

votes
1

answer
34

Views

Rerunned test method marked as SKIPPED

I wrote a script in selenium with TestNg framework such that the failed test method will be rerun, and this is at Test Level by indicating the location of the class that implements the IRetryAnalyzer in @Test() TestNG had successfully rerun the failed test method; the output has the following inform...
Vijayrushi
1

votes
1

answer
331

Views

@AfterClass is not executed

In my test automation runs tests on two mobile devices in Parallel with testNG feamework. The @BeforeClass and the @AfterClass methods are in the base (super) class that all other test classes inherit. The BeforeClass method initialized the driver session and the AfterClass terminates the session....
S P
1

votes
1

answer
26

Views

Read XML parameters values in Testlistener

I am running TestNG via TestNG.xml, Is there any way I can read parameters from TestNG.xml to Itestlisteners. I wan to read browsername value and URL value from below XML to my Testlistener. TestNG.xml:-
Ravi
1

votes
2

answer
24

Views

How do I Print the Parameters not values using Listners. Also what is wrong when my string returns null as a prefix to every output?

I want to print the Parameters passed to this method using Listners. @Test @Parameters({'browsername','URL', 'ebrowse','eURL'}) public static void LaunchApplication(String browsername, String URL, String ebrowse, String eURL ) throws InterruptedException, IOException{ I have used the following code:...
Learner_me
1

votes
1

answer
57

Views

How to merge all the testng emailable report into single report through programatically

I have 100 test cases and retry logic will execute if there are any failed test scripts and the emailable report had only status of failed test scripts alone. I just want to merge the first and retry run test reports as single one in the form of emailable report in testng after execution completed....
ArrchanaMohan
1

votes
1

answer
26

Views

How to run multiple methods in a class first before running the methods in other class while parallel execution

I'm facing with the following problem: I created two classes which include @Tests with priority attribute: @Test( priority = 1 ) public void testA1() { System.out.println('testA1'); } @Test( priority = 2 ) public void testA2() { System.out.println('testA2'); } @Test( priority = 3 ) public void testA...
Rashi
1

votes
1

answer
3.1k

Views

testng - Abstractmethod error

Im trying to create a testng class and run it in Eclipse but I get this below error - java.lang.AbstractMethodError: org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(Lorg/testng/ISuite;Lorg/testng/xml/XmlTest;Ljava/util/Collection;)Lorg/testng/TestRunner; at org.testng.Suite...
user1050619
1

votes
3

answer
432

Views

Below If else condition is not working in my script

driver.findElement(By.id('btnSendMailCopy')).click(); Thread.sleep(3000); if(driver.findElement(By.xpath('/html/body/section[1]/div/article/nav/button[2]')).isDisplayed()) { driver.findElement(By.xpath('/html/body/section[1]/div/article/nav/button[2]')).click(); System.out.println('clicked')...
Arun
1

votes
2

answer
1.5k

Views

testng problems writing results to test-output

Can someone explain what needs to change in Eclipse to resolve the following TestNG reporting issues? After updating Eclipse MARS.2 TestNG plug-in to 6.9.11.201604020423, TestNG displays messages showing problems with writing the results: [Utils] Problem creating output directory C:\the\project\path...
hal
1

votes
1

answer
178

Views

TestNg Eclipse Plugin - NullPointer when start test

When I try to run a testNg class, I immidiatly recieve this error about a NullPointerException (see log below). !ENTRY org.eclipse.core.jobs 4 2 2016-06-10 11:58:27.039 !MESSAGE An internal error occurred during: 'Launching ConvertionManagerTest'. !STACK 0 java.lang.NullPointerException at java.util...
RetroMime
1

votes
1

answer
175

Views

How to run the same code for multiple input files in TestNG framework?

My test class has some code which does the desired validation. Test Class: @Parameters({ 'InputFile01'}) @Test public void testCase01(String InputFile01) { //Code xyz } @Parameters({ 'InputFile02'}) @Test public void testCase01(String InputFile02) { //Code xyz (Same code as above) } I have to copy a...
Deepak543
1

votes
1

answer
243

Views

RemoteTestNG.java : 76 error while running TestNG test set

Below is the code which I am trying to run. As I run the below code, the website of Mercury tour opens and the execution stops there throwing a list of errors that are mentioned below after this code. I tried uninstalling and re-installing TestNG framework but in vain. package testNG1; import java.u...
Diganta Bhaduri
1

votes
1

answer
992

Views

An internal error occurred during: “Compute launch button tooltip”. java.lang.IllegalArgumentException with Eclipse Kepler after TestNG installation

My projects in Eclipse Kepler were working just fine until I downloaded TestNG. Post TestNG download, I am unable to click on Run button for my code. after I click on run or even if I hover over on run the following error message is displayed. An internal error occurred during: 'Compute launch butt...
Manasi k.
1

votes
1

answer
24

Views

How to have my “config()” running only once per testng session?

I have multiple testNG classes that are to test different features of our website. For each class, before it is being executed, it needs to run a same config() call to have some devices setup. So for each individual test class, it looks in this format: public class TestFeature1 extends TestEnviro...
user3595231
1

votes
1

answer
0

Views

How to execute 2 test classes in order using TestNG if classes belongs to different tests?

I'm new to Automation and wondering how do I execute 2 test classes in a specific order if they belong to different tests. I have the following testng.xml file: When executing the project, TestClass2 is executed first. How can I change the testng.xml or perform some other changes in order for the Te...
gene
1

votes
2

answer
0

Views

How to run a particular method if my test case failed(using TestNG)?

I'm writing test cases using TestNG.I want run a particular method after every failure test case.is there any way to run that method after every failure case?
SnR
1

votes
2

answer
214

Views

Where to put testNG xml file in ANT java web project

I am using testNG in a java web project. When I run the test with gui eclipse on Linux machine it creates a .xml file in my /tmp/ folder. My concern is If I create a custom xml file then where to put that file in project and how we can run that test with eclipse gui.
shubham12511
1

votes
1

answer
1.1k

Views

Not able to find TestNG options in eclipse after plugin installation

I am using eclipse kepler and I installed plugin for testNG as: Help --> Install New Software --> http://beust.com/eclipse After the installation, I can't find the TestNG options in eclipse. I even changed my jdk from 1.6 to 1.7 in java compiler and eclipse.ini Please suggest.
zenith
1

votes
2

answer
1k

Views

Can't make selenium webdriver click the checkbox

I'm working on eclipse neon, selenium webdriver 2.53.0 and firefox 45.3.0 esr. I can't make selenium mark the only checkbox on the site. Here is my test script: package testy; import org.openqa.selenium.WebDriver; import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.sel...
błarzej
1

votes
1

answer
159

Views

Run a java file using JUnit in Eclipse through command terminal

I am new to automation using Appium. So while using Eclipse i created a TestSuite.java file which includes all of my test cases.I want to run this file using JUnit in eclipse through command terminal.Please help me with command in mac. I am using macOs. I am adding some screenshots of my project. (1...
Dinesh Kumar
1

votes
1

answer
17

Views

How do I retrieve (x) = Arguments from TestNG debug configuration?

I am trying to debug a TESTNG test using Debug Configurations option in Eclipse and I need to get the Program arguments inside my TestNG test. Could you please help me in accomplishing it?
Srinivasan Ramu
1

votes
3

answer
1.4k

Views

TestNG Close Browsers after Parallel Test Execution

I want to close browsers after completion of all test. Problem is I am not able to close the browser since the object created ThreadLocal driver does not recognize the driver after completion of test value returning is null. Below is my working code package demo; import java.lang.reflect.Method; imp...
manish
2

votes
1

answer
92

Views

TestNG Tests continue forever (but not always)

My TestNG tests are weird... sometimes they finish, but sometimes they don't, even though there is nothing random. Most of the tests run, then nothing happens, except the TestNG result bar is green, and flickering every few seconds (as if something would happen in the background) It's not always a...
Thomas Sallaberger
3

votes
1

answer
1.1k

Views

Exception in thread “main” Error in Eclipse when trying to run TestNG class

When I attempt to run a sample TestNG class in Eclipse with Java 1.7.0_79 I get the following errror: Exception in thread 'main' com.beust.jcommander.ParameterException: Unknown option: -protocol at com.beust.jcommander.JCommander.parseValues(JCommander.java:742) at com.beust.jcommander.JCommander.p...
Tom
3

votes
1

answer
113

Views

test-outpout folder not created with mvn clean install command while running Selenium webdriver script with TestNG

I created maven based Selenium project using TestNG framework. When i run command :- 'mvn clean install' from the command prompt then my script runs fine but 'test-output' folder doesn't created and if i run my script via Eclipse right click on testng.xml file--run and TestNGsuite then test-output f...
Suresh Sharma
2

votes
0

answer
93

Views

Why it doesn't take a screenshot in TestNG

TestNG runs on Mac OS X Hello, I use ITestListener and in case in my @Test there is something wrong (e.g. element is missing due to wrong xpath), so it should take a screenshot in onTestFailure(ITestResult result) and store the screenshot in folder 'report' After execution the test, somehow I cannot...
lorenlai
5

votes
2

answer
3.6k

Views

TestNG Reporter [email protected] failed java.util.ConcurrentModificationException

I'm new to TestNG framework, I have written script for an application using TestNG framework. Script working fine but yet I'm getting an error at the end of console. Error attached. Please anyone can help me. Thanks in advance.enter image description here
user3782636
2

votes
1

answer
51

Views

Adding TestNG to and existing Selenium Script - My pass/fail Output not matching up with TestNGs

First timer here to Stackoverflow, and a beginner to Java/Scripting/Selenium/TestNG I created a simple script to check page meta data which correctly prints pass or fail if expected page title, I modified some code from a tutorial I found. I Later tried to add the test of some TestNG frame work modd...
Leon Tilbrook
2

votes
2

answer
632

Views

I am getting null pointer exception for webelement defined under @FindBy annotation in page factory model

I'm new in Selenium learning. I'm getting null pointer exception when I try to use web element - Milestone_Tile_Text.click; in my code but it works fine when I use LoginTestScript.fd.findElement(By.linkText('Milestone')).click(); Please see below code I have used PageFactory.initElements as well b...
N.D
2

votes
1

answer
5.5k

Views

Error org.testng.TestNGException: Cannot inject @Test annotated Method main with class Ljava.lang.String;

I have created a testng.xml file to run a suite of my selenium webdriver test. From eclipse I can run this just fine as a testNG Suite, but from the command like I get the following error. testng.xml ; command ran: java org.testng.TestNG testng.xml Exception trace: [Error] org.testng.TestNGExceptio...
CJ2K
2

votes
1

answer
192

Views

org.openqa.selenium.NoSuchElementException: no such element using TestNG

Error is thrown when code reaches the line before 'almost end'. But error is thrown for the line driver.findElement(By.id('txtEmail')).sendKeys('abc.in'); driver.findElement(By.id('btnEmailSubmit')).click(); Please help me in finding out what's causing this exception Note:Error is shown when I use T...
Soumya
4

votes
1

answer
1.2k

Views

TestNG problems when running the project

Below is the reported error when I run TestNG.xml. Even though I changed the scope to compile, it still is not fixed. I've also built the project again. I would appreciate if someone can give a feasible solution for this. Exception in thread 'main' org.testng.TestNGException: 6.1.1 is not a supporte...
abhishek Sharma
4

votes
10

answer
19.7k

Views

Unable to read repository at http://beust.com/eclipse

Eclipse for Testers Version: Indigo Release Build id: 20110615-0604 I try to install TestNG but below error appeared. ' Unable to read repository at http://beust.com/eclipse. http://beust.com/eclipse is not a valid repository location. ' Kindly Resolve the problems
Faizar
3

votes
1

answer
84

Views

Why are my @BeforeTest methods sometimes reported as the last element of previous test?

I have a testNG suite, executing some selenium code. I am testing navigation between pages in a webapp I have. There are four different user levels, which gives access to restricted pages, based on user type. I also need to test this in both Chrome and IE. I have followed a Mkyong.com tutorial for m...
KjetilNordin
2

votes
1

answer
252

Views

Testng running sequence of the test case is changed after updating to 6.14.2

Previously I am using testng 6.8.8 version and all tests are executed as expected. But before a few days back I updated testng version to 6.14.2, Started facing running sequences issue. I also tried with priority change and all things but it's not working as it was working in testng 6.8.8. Refer sou...
Denish Makwana

View additional questions