JUnit 4.x and Selenium run program from script (windows and linux) - linux

I have a few testcases that are written using Selenium and JUnit. I would like to write a windows script to start the programs. I referred to the solution # Simple Script to Run Java Applications on Linux and Windows. The solutions # how to run junit test cases from the command line provide a method to run the Junit test cases using:
java -cp /path/to/directory/java/junit.jar org.junit.runner.JUnitCore [test class name]
I am however interested in creating a generic script for windows which would run the harness. I have little or no knowledge about the windows powershell, I would love to hear about a solution that could make use of powershell scripts to do the same.
Having said that, it would be great if you could guide me to do the same for Linux.
To summarize:
Windows script to run JUnit 4.x and Selenium programns
Approach to do the same in windows powershell
Similar script for Linux

Related

How to run cucumber test cases in Linux centos without using Intellij

I have cucumber test cases with gradle build and can run them through intellij in windows 10. ( able to run .bat file by picking the path from intellij)
Question. ## Please help me on how to run a specific cucumber test scenario in Linux centos? ##
Is there a way of running the cucumber test scenario by a file in Linux Centos?
You can run cucumber from the command prompt. How you do this will depend on what language version for cucumber you are using.
Have a look at https://cucumber.io/docs to find info for your specific platform.

report lab libraries not working when python 3.5 script is run from OSX Automator

I have many python 3.5 scripts to handle my business affairs. All of these run perfect from IDLE and from the bash shell. When I create OSX Automator apps they all run well except the included reportlab functions do not work. I have also attempted to create the app with py2app but this fails to find the qt4 and reportlab libraries and fails. Any suggestions?

Execute loadrunner Script

I would like to know how I can run Loadrunner Scripts from Linux console. The scripts are ".usr". I tried to launch them from cmd and everything ok but what I need is from linux console.
Running scripts directly from the console Linux or Windows is not officially supported.
Simple answer is you can't. Linux is currently used only as a Load Generator, and not an initiator of a Load test.
Hope this helps,
Lior

Is separate set of selenium jar files needed for linux os?

I am using Selenium Webdriver(v 2.47.1) automation tool in windows operating system. I have created one automation script using Eclipse IDE and integrated script with Jenkins CI. In Jenkins I created new job with help of windows batch file. Jenkins job successfully completed.
I have uploaded same set of code(contains src, lib, bin directories..) to Linux server where Jenkins CI is installed and tried to create new work using Jenkins. In Linux OS I have used shell command to build the project. Project not builded successfully..
I don't know where the actual problem is..? Please help me on this
There is few things which can effects scripts in Linux environment
1st is batch file you are using
refer it to resolve it if exist in your case
http://stackoverflow.com/questions/32120102/bash-file-is-running-fine-in-windows-for-testng-but-it-is-not-working-in-linux-m
Another one is if your using chrome then you need to set chrome binary according to linux
http://chromedriver.storage.googleapis.com/index.html?path=2.16/
Hope it will help you :)
If still you are facing problem then please share the error your get on terminal/Jenkins jobs section

Eclipse with Remote Unit Tests

I'm working on a Mac. My dev server is linux. My directory is mounted over SSH using FUSE. How can I execute my ant script on the remote server within Eclipse? Right now I'm just switching to a terminal and running ant manually.
Please, no suggestions that I run the tests locally.
I don't believe Eclipse has any built in support for running ant-scripts remotely (that is, after all, not a very common use case). The alternative is to run the ant-script using ssh as an external program. You won't get the ant builder's settings, but otherwise it should work.
If you are using Eclipse, have you checked out the Target Management plugin?

Resources