We have multiple testing repos, and some of the scenarios depend on the steps already created in a separate repo, so I'm trying to build the JAR file and include it in the external libraries of the other repo. Then I define my gluecode in the IntelliJ runner with two separate lines:
com.edge.automation
C:\Users\MY_NAME\.m2\repository\com\reissue-automation\2.0.3-SNAPSHOT\reissue-automation-2.0.3-SNAPSHOT-tests.jar!\com.reissue.automation.stepdefinitions
IntelliJ is able to recognize the Gherkin sentence, but when I run it, it is throwing this exception:
eissueautomationstepdefinitions'
at io.cucumber.core.options.CucumberPropertiesParser.parseAll(CucumberPropertiesParser.java:156)
at io.cucumber.core.options.CucumberPropertiesParser.parse(CucumberPropertiesParser.java:88)
at io.cucumber.core.cli.Main.run(Main.java:48)
at io.cucumber.core.cli.Main.main(Main.java:33)
Does anybody know what this error means or if it's possible to include glue code from external libraries?
I ended up running the following command to copy my dependencies into the target folder which added it to the classpath.
mvn install dependency:copy-dependencies -DskipTests
Then it picked up the glue no problem.
com.edge.automation
com.reissue.automation.stepdefinitions
If anyone has a better solution feel free to post.
May you add the detailed steps on how you accomplish it?
I tried running
mvn install dependency:copy-dependencies -DskipTests
And then running my maven command for running the test cases and not luck.
If you can add your folder structure and how you put it in the glue code of cucumber runner will be appreciated.
Also cucumber version might help.
Thanks
Related
I am interested in understanding how to install node-sqlite3, but provide by own precompiled package of sqlite3: I just want to install the Node client and skip the build phase entirely during install.
How can I do this?
(Reasoning: I am going to test the module in multiple environments and have already read countless posts of people having build issues in various environments, so I'd rather manually compile myself.)
It turns out that I was looking for a package like this one:
dblite on npm, GitHub
I am new to gauge testing tool .I have a maven project that consists of specs and step implementations. Mvn package phase does generate a jar file with all the required classes. However I cant figure out how i can run the gauge specs using a Main class in java, such that i can just run the jar file to run the tests. Is this possible?
Unfortunately no, Gauge binary must be installed and available to execute the specs.
As the Gauge binary is not written in java it cannot be bundled in a jar file and invoked from a Main class.
If you'd like to automatically download and use Gauge in a CI/CD environment, try something like https://github.com/maven-download-plugin/maven-download-plugin to download gauge into a convenient location as part of your mvn build itself.
More info about this here
There is a way to do this. You have to package maven and gauge inside the project directory and include them in the jar. In the main method, unzip all files, then run a shell script to export maven and gauge in the project directory to $PATH, then execute mvn gauge:execute as usual. It's a bit of a hack as it extracts everything to the directory in which the jar is located, but it works on RHEL 7 and I haven't managed to find a cleaner method.
I am having trouble building the Aerospark connector # https://github.com/aerospike/aerospark
I have created fresh Ubuntu box, installed JDK, SBT, Maven, Scala 2.10, and then followed the steps at the github page above. During the build i get this error and I am not sure which is the most direct way to build this properly....
[error] 1 error was encountered during merge
java.lang.RuntimeException: deduplicate: different file contents found in
the following: /opt/astools/aerospark/lib/aerospike-helper-java-
1.0.6.jar:META-INF/maven/com.aerospike/aerospike-client/pom.xml
/root/.m2/repository/com/aerospike/aerospike-helper-java/1.0.6/aerospike-
helper-java-1.0.6.jar:META-INF/maven/com.aerospike/aerospike-client/pom.xml
/root/.ivy2/cache/com.aerospike/aerospike-client/jars/aerospike-client
3.3.1.jar:META-INF/maven/com.aerospike/aerospike-client/pom.xml
Are there any updated instructions for building this - the git link in the instructions seems outdated incidentally.
As an aside, has anyone tried this with PySpark?
There was an issue with the build file which affected ubuntu. Can you pull the latest changes and go through the build process again?
I have my application which runs in Jboss Fuse on Linux. I deploy my artifacts as jar files under the /deploy directory. I was planning to make use of Cobertura to get code coverage report after executing my jmeter tests. I instrumented my jars and placed under /deploy. I ran my jmeter tests.
Now I am unable to find the location where .ser file will be present.
I tried searching inside fuse directory.
Can anyone help me in getting Cobertura working with Jboss Fuse?
For most versions of Cobertura, you can add:
-Dnet.sourceforge.cobertura.datafile=<filename>.ser
to the JBoss/JVM startup parameters (e.g. run.conf) to specify explicitly the file where you want the report to be created.
Also, you need to make sure the cobertura.jar itself is present in the classpath if you haven't done so yet.
Can anyone provide me with a detailed explanation on how to setup nightwatch and start writing browser tests? I have searched for such information online and was unable to find it. The nightwatch.js website had good information about various nightwatch command line commands, but not about actually setting up a nightwatch project, which is what I am having trouble with.
Specifically, I do not have a good understanding of the various files that come with installation of nightwatch, and how I am supposed to use them.
Step-by-Step Beginner's Tutorial
We needed an up-to-date, well-researched and maintained tutorial for Nightwatch for our team so we wrote one: https://github.com/dwyl/learn-nightwatch
We (highly) recommend using a nightwatch.conf.js (.js) file for configuring Nightwatch because (unlike a .json file) it allows you leave in-line comments to your fellow developers (i.e avoid "WTF" moments by communicating) and to evolve your configuration with variables & functions as needed.
Also, we prefer to install Nightwatch (and its required dependencies) locally so it's clear to everyone exactly what is required to run the project and which versions we are using.
Using the selenium-download module will download the latest versions of Selenium Standalone Server and Chromedriver (both required to run a basic Nightwatch test) for your OS and means you will be up-and-running much faster.
Rather than including the whole tutorial here we invite you to Star/Fork it on GitHub: https://github.com/dwyl/learn-nightwatch#step-by-step-tutorial
Feedback / questions / updates / improvements are always welcome!
You need basiclly two things:
The nightwatch.json file in the root of your project
And nightwatch installed (npm install -g nightwatch).
After that you use it on the command line as described in the documentation here and it will automatically grab your nightwatch.json file and run your tests based on the default test_setting.
I opened up an issue to add a nightwatch init command, so the setup of the nightwatch.json file is easier.
Further reading
How to setup nightwatch.json
Github Repository
You can go through this step-by-step method to get better understanding
Nightwatch.js Part 1
Nightwatch.js Part 2
one big problem for users "is not worked on count 1-2-3".
so we find many-many-many times our all internet :)
and.
1) nightwatch is installed (by .rpm, .deb, npm, downloaded). is haven't questions
2) is worked by execution "nightwatch" on CLI
3) but where wunderbar example?????????????
of course, on internet!
4) by my bad memory and catalog list in simple test:
- create catalog
- create in catalog 2 dirs:
bin for web-drivers (add chromedriver, selenium-server-standalone as minimum)
tests for tests
5) we need this simple config - nightwatch.json in catalog (use any simple which access have)
6) create-copy-paste any simple test in test catalog (it's one on planet :)
7)it's all, run in catalog by CLI: nightwatch
you need only this? for first time, before documentation readings? ;)
$ npm install -g yo
$ npm install -g generator-selenium-nightwatch
$ yo selenium-nightwatch
$ npm install
$ npm test