I have a project (having packages and different classes)in eclipse(Juno Version) but is not written using TestNG. Now I am trying to install TestNG and Maven in eclipse.Will it affect my existing project??The Answer is NO. TestNG libraries are added
Is there a way to run same class in parallel with multiple threads, like <suite name="myTestSuite" verbose="1"> <test name="myTest" parallel="classes" thread-count="5"> <classes> <clas
This question already has an answer here: TestNG java.lang.NoClassDefFoundError: com/google/common/primitives/Ints 3 answers I am trying to run the below program using testNG in eclipse and am getting the error as shown below: Code: package TestNGPac
I am trying to Identify Elements of the page. I have table and there is lot of rows with multiple Inputs. How to access Input from table rows? This is my java class public class Setting extends Page { /**Identify Elements of the page*/ @FindBy(id="ta
I want to capture the message (diplayed in form of text) which is generated after I enter invalid input in the textbox. This message is displayed when I click on other textbox or simply on the screen. This text has the id assigned to it, but gets dis
I am using testNG 6.9.10 that installed in Eclipse. I was trying to use retry to make sure the failed tests could run maxcount times that defined. See below codes. public class TestRetry implements IRetryAnalyzer { private int retryCount = 0; private
I am trying to run a test case in java selenium with testing in eclipse but I am getting the below error .Is there anyone who can help me.? org.testng.TestNGException: org.xml.sax.SAXParseException; lineNumber: 34; columnNumber: 15; The content of el
I am testing a business service with TestNG, mockito unit tests in spring boot application. Application is multi-module spring boot project.And I am writing unit tests for business module. I have added following dependencies related testing in pom, <
I have a gradle task that executes a testng test suite. I want to be able to pass a flag to the task in order to use a special testng xml suite file (or just use the default suite if the flag isn't set). gradle test Should run the default standard su
I am an intern automating testing of a large corporation's website and honestly, I'm in over my head. I'm trying to learn everything and use it at the same time and no one else in this firm knows how to use the tools I'm using, so I don't have many o
Does dependsonGroup work with beforeClass? My code is like: @BeforeClass(dependsOnGroups = { "init" }) public void setup() throws Exception { //some code } @Test(dependsOnGroups = { "init" }) public void test() throws Exception { //som
When trying to run an Arquillian (1.1.8.Final) test, it fails with a huge stack trace with this as a description: Error launching test at http://127.0.0.1:9080/test/ArquillianServletRunner?outputMode=serializedObject&className=pacakges.UserHandlerTes
My sample testNG method is as below: @Test(groups = { "regression", "sanity", "TTD-001" }) public void createProject() { //Some execution happens } Can we write a listener class, which can give me a string array of { "re
Press TAB and then ENTER key in Selenium WebDriver TestNG GenericKeywords.typein(class.variable, PageLength); pagelength is nothing but string. After this code, I have to give Tab key. I don't know how to give Tab key in Selenium WebDriver TestNG?Usi
We recently integrated our application with spring boot. Our test cases are based on testng framework. Our base test class looks like the following @SpringApplicationConfiguration(classes = Application.class) @ActiveProfiles(profiles = "test") @
Suppose, I am testing method which checks whether all links are present on page. Ex : @Test public void testLinks(){ driver.findElement(By.linkText("link1")); driver.findElement(By.linkText("link2")); driver.findElement(By.linkText(&qu
Let us have the following TestNG tests: @Test public void Test1() { } @Test (dependsOnMethods={"Test1"}) public void Test2() { } @Test (dependsOnMethods={"Test2"}) public void Test3() { } Tests serves as functional end to end webui tes
This works as supposed, test fails (due to haltTesting()) and is repeated 2x public class A0001_A0003Test extends TestControl { private Kunde kunde = Kunde.FR_WEHLITZ; @Test(retryAnalyzer = TestRepeat.class, groups = {TestGroups.FAILED}, description
In my test method below, this method has multiple asserts. I want it to run so that if all the asserts pass then it will log the status as "Passed" in my test management tool (we are integrating Test Link with Selenium) But if any one assert fai
Looking at the latest versions of JUnit[v 4.11] and TestNg[v 6.8.5] as of today, I see no big differences in both the frameworks. If I am using Spring MVC in my project and have several layers and need unit/integration tests at all the controller / s
I tried to automate sending email from Gmail (https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=http://mail.google.com/mail/&scc=1<mpl=default<mplcache=2) by using Selenium WebDriver with Java
We are using Testng with RC. Would want to know a common/practical/generally used way to determine which tests to be run & not run. Take to scenario - In one test suite I have 3 modules - A, B & C. In each of the modules, there are 5 - 6 tests. Th
I am using the Eclipse-PlugIn for TestNG which works fine and executes my tests. But this is only when I start it out of Eclipse. If I use Apache ANT with a specified testng-target it says that TestNG can't execute the tasks. The problem is that ther
For my internship, I have to use TestNG and selenium for testing a web-application. But I have a problem, sometimes selenium or the Browser is not working for some random reason, so a working test is marked as "failed". To avoid that, I can use
@BeforeTest @Parameters({"selenium.host", "selenium.port", "selenium.browser", "selenium.url" }) public void startServer(String host, String port, String browser, String url) throws Exception { selenium = new Defaul
I need to integrate DbUnit with TestNG. 1) Is it possible to use DbUnit with TestNG as DbUnit is basically an extension of JUnit. 2) If yes how?Finally i found out a way to use DbUnit with TestNG! Using Instance of IDatabaseTester works, but another
I am using Selenium with Java, TestNG. My java code is as follows: public static SeleneseTestCase seleneseTestCase; (class level variable) @Test(groups = {"All Blank"}) public void a() throws Exception { selenium.click("btnLogin"); sel
I have a TestNG suite with large amount of methods. I execute this suite using wrapper built on top of TestNG runner. All tests in the suite fail except one. What should I write in testng.xml to execute just that one failed test? Obvious solution is
This is a bit of an odd question, but it has been bothering me for a few months now. I have built a JPA-based web application using Wicket + Hibernate (built with Maven), and want to test the DAO layer directly. I created a specific src/test/resource
We noticed that when testNG test cases extend TestCase (JUnit) those tests start executing as Junit tests. Also, I should probably mention, the tests are run through Maven. Is this a bug or a feature? Is it possible to override this behavior and stil