I have created a java project to run automated test cases for native app using appium and selenium.
Now our clients want to run that java project through .NET.
I have tried using ikvm.net but it says "Manifest doesn't contain a Main-class" because testNG class doesn't contain main class.
Can anybody suggest another way to achieve this?
As testng is for java you can do something like this:-
You can create a bash file for testng which is execute testng for java
Refer:-
http://stackoverflow.com/questions/32120102/bash-file-is-running-fine-in-windows-for-testng-but-it-is-not-working-in-linux-m
Now you need to execute that bash from a C# code
http://raspberrypi.stackexchange.com/questions/9474/how-can-i-run-a-terminal-command-bash-from-c-mono
Hope it will help you :)
Related
Till now I am running multiple scripts in parallel in selenium using testNG framework. Now I have to run these scripts in parallel using only java with out using any framework. Is there any possible way?
Firstly, You have to do is to set Global env. variable "ClassPath", in which you have to mention path of all classes(Selenium Jars and other classes also if used) which is used in Selenium Script.
Then you can run multiple Selenium Scripts from CMD at same time and to make process easy you can also create BAT files. You can also schedule Selenium Script with BAT files.
Hope my answer will help you.
Thank You,
Ed D, India.
Hi and thanks in advance,
I have several scripts in python(2.7+) which produce junit test results. Currently I am trying to leverage some java testng code. I was wondering if there is a way to use python to execute java testng code while including it in a junit test suite. I am aware that testng produces a junit reports folder.
Note for the python junit scripts, I am using xmlrunner to produces the results.
A solution may be to call a command prompt from your python code which calls the prompts to execute the java environment. To call TestNG or JUnit for example, you just have to call the specific jar file from the lib.
import subprocess
proc = subprocess.Popen("java...", shell=True, ...)
You can catch the returncode to check if the tests where executed correctly.
Hello everyone I am a grader for a programming language class and i am trying to use jenkins continuous integration for running some junit tests on their code that is pushed to github.
I was able to get all the committed jobs to the jenkins, but can i run a python file in order to push a testing class to their code and then build their projects an get an xml report about their program test...??
Jenkins allows you to run any external command so you can just call your Python script afterwards
I know this is basic Java Eclipse question. But, if I create Junit test cases from Eclipse and be able execute them in Eclipse.
Can I also take same test cases in run them in unix/linux envirnment? Do I need to set different in eclipse in order to run them in unix/linux envirnment?
Thanks.
The Java Virtual Machine (JVM) is fully platform-independent. Any JUnit tests that work on one OS, such as Windows, will work on another, such as Linux.
To run a JUnit test inside UNIX/Linux, you can:
Install and run it from Eclipse, just like you would on any other OS (Eclipse, being built in Java, is also platform-independent).
Run java org.junit.runner.JUnitCore test class in the terminal, where test is the name of the test you want to run, and class is the class that that test resides in.
I need to run a java class (actually a test case) from ant script. Is it possible to do so?
At the most basic level you could use the ant java task to do this.
But you tagged with junit4 - can you not use the ant junit task?
To execute java class, you can use java task http://ant.apache.org/manual/Tasks/java.html
To execute junit test cases: http://ant.apache.org/manual/tasksoverview.html#testing
Try the java task. If you want to run tests, you might want to take a look at JUnit