Hot answers tagged

4 votes
Accepted

Maven installation Error JAVA_HOME not defined correctly but it really is defined correctly

Get rid of the trailing backslash and especially the trailing semi-colon: C:\Program Files\Java\jdk1.8.0_91 By the way, you can display the current setting with the shorthand of typing "set" at a ...
user avatar
3 votes
Accepted

Version Control for Selenium Itself

This is what you use Maven for. Maven manages and downloads your dependencies. Suggest you try to always use the latest stable version of Maven and you should be set. Example pom.xml: <...
user avatar
3 votes

Not able to install maven on windows

Steps to install Maven: Install JDK and add path of JAVA_HOME Download Apache Maven Add M2_HOME and MAVEN_HOME Add To PATH Modify your System variables: Add both M2_HOME, JAVA_HOME and MAVEN_HOME ...
user avatar
  • 6,749
3 votes
Accepted

TestNG- No tests found. Nothing was run

make sure you are importing org.testng.annotations.Test and not org.junit.Test
user avatar
  • 146
2 votes

Possibility of using maven surfire plugin for SOAP webservice tests

Take a look at Karate which easily integrates into a standard Java / Maven project. You can actually generate the standard JUnit XML report format which most CI tools understand. Or you have the ...
user avatar
2 votes

java.sql.SQLException: No suitable driver found for jdbc:db2://URL/Database - pom.xml

It cant find your driver. You need to download the driver from here: https://www.soapui.org/jdbc/reference/jdbc-drivers.html and then save the .jar file to your c:\Program Files\SmartBear\Soapui5.x\...
user avatar
  • 121
2 votes
Accepted

Jenkins: failing builds on warnings

Regarding question 1: You could give the Warnings Plugin a try. Regarding question 2: Configure your SonarQube project, to have a Leak Period since "previous build" The SonarQube Leak Period ...
user avatar
  • 136
2 votes

Cucumber step definitions in .feature file not highlight

Solved File --> Settings--> Editor --> Inspection And Check all the options in Cucumber like following
user avatar
  • 382
2 votes

Error in Maven project build-"Could not initialize class org.apache.maven.index.ArtifactInfo"

@Mahesh, I have below suggestions:- # Solution 1 Go to your eclipse installation folder Run "eclipse.exe -clean" # Solution 2 Uninstall Netbeans because Eclipse and Netbeans are both might using ...
user avatar
2 votes

testng.xml is not executing when we run pom.xml for maven project selenium

The testng.xml should be located in your test resources. That way the testng.xml will be copied. You can also configure surefire plugin to explicitly run testng suite xml files. Should your maven ...
user avatar
2 votes

Jmeter + Maven: how to add a jar file to JMeter /lib/ext folder

You can add libraries to "lib/ext" folder as follows: <configuration> <jmeterExtensions> <artifact>kg.apc:jmeter-plugins-casutg:2.4</artifact> </...
user avatar
  • 12.5k
2 votes
Accepted

Can I create an executable TestNG Selenium jar with my tests using maven

If you want to build so callled "fat jar" - a single executable .jar containing all dependencies and invoking TestNG main class I would recommend going for Maven Shade Plugin: Remove the following ...
user avatar
  • 12.5k
2 votes

Getting “testng.xml is not a valid file” error in Jenkins

Try this: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <suite name="Suite"> <test name= "TestCases"> <classes> ...
user avatar
  • 10.8k
2 votes
Accepted

Null Pointer Exception Error at Selenium TestNG

The initElements method second argument should be a page class, you feed it the driver. I think you should change the constructor of Homepage_ReCheck_Search to: PageFactory.initElements(driver, this); ...
user avatar
2 votes

Custom Framework for Writing a Test that Reads a CSV File into a HashMap

I think your biggest issue here, while not strictly test related, is your understanding of what the code you've written does (versus what it is supposed to do). What your code currently does If your ...
user avatar
  • 7,034
1 vote
Accepted

JMeter + Maven: how to send test result data to InfluxDB?

You don't need to amend anything in pom.xml file, the changes need to be introduced in JMeter Test Plan, to wit: Add Backend Listener to your Test Plan Choose org.apache.jmeter.visualizers.backend....
user avatar
  • 12.5k
1 vote

Clean pom.xml from all not used dependencies

Delete .m2 folder which contains all the dependencies form your user-home.Then re-build your package using "mvn clean package" command.All your dependencies will be removed and when you run a maven ...
user avatar
  • 481
1 vote
Accepted

Cucumber test suite: how to pass username and password without hardcoding

You can do Data-driven testing using these, Scenario Outline with Examples keyword Using external Files: Excel, Json, XML For more details check below links: 1. Data-driven-framework-with-excel 2. ...
user avatar
1 vote

Cucumber test suite: how to pass username and password without hardcoding

There is a feature called Scenario Outline for data driven tests in cucumber. It can be used in this scenario to pass different user/passwords as data to the test as parameters.
user avatar
1 vote

Cucumber test suite: how to pass username and password without hardcoding

you can read the topic about enums and interfaces in Java. Maybe it will help you to create something as you want. There are a lot of decisions. The xml file can be created with different accounts as ...
user avatar
  • 51
1 vote

Can we run Robotframework test cases through Maven Surefire Plugin to run them parallel

As far as I know, the only tool that allows you to run in parallel something written in robot framework is pabot. Things you should know: Pabot will split test execution from suite files and not ...
user avatar
  • 175
1 vote

Unable to run cucumber tests from command line

mvn clean means you're executing the clean phase of maven which would not run any tests. You should probably try test or verify, e.g. mvn clean verify. More to read: https://maven.apache.org/guides/...
user avatar
1 vote

How to run tests in parallel using Robot Framework Maven plugin?

You are right that pabot is the way to do this unless you want to hack robot internals, you just have to find a way to have it run outside maven. I would do this by configuring Jenkins to preserve ...
user avatar
  • 1,172
1 vote

Use enviornment variables in selenium properties file

I assume you're talking about java You wouldn't be able to achieve your goal without writing some extra code. Below is the example of how you can to that: Example pre-conditions: your property file ...
user avatar
  • 11.4k
1 vote

Use enviornment variables in selenium properties file

I hope -D option will help to some extent. But directly java won't interpret the environment variables. You need to handle it. The below link have more insight on implementation of the similar option. ...
user avatar
  • 714
1 vote
Accepted

Possibility of using maven surfire plugin for SOAP webservice tests

Maven Surefire plugin can handle any tests written with JUnit or TestNG. This means whatever your JUnit/TestNG are doing, including SOAP Web servce testing, they can be run with Maven Surefire plugin. ...
user avatar
  • 10.2k
1 vote

Run unix commands using Jsch maven

You forgot to connect to the channel, e.g. channel.connect(); Then you need to read the response. There is an example at http://www.jcraft.com/jsch/examples/Exec.java.html InputStream in=channel....
user avatar
1 vote

Execute SoapUI project with Maven and Jenkins

This is my favorite getting started guide for maven and Jenkins, it is with selenium, but should also work with soapui java code. http://www.guru99.com/maven-jenkins-with-selenium-complete-tutorial....
user avatar
1 vote

Cucumber: Type Mismatch cannot covert from Class <Step Definition> to Class<?extends Runner> in eclipse

Change @RunWith(StepDefinition.class) to @RunWith(Cucumber.class). The Cucumber runner needs to run with a class that extends Runner.class; StepDefinition.class does not extends Runner.class.
user avatar
  • 356
1 vote

CI for Selenium Project

Beside Jenkins, there are other CI tools. In this article - Jenkins vs other Open source continuous integration servers - you may find the quick review of the top Open source CI tools. And although ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible