Tips and Tricks

Downloading files using Selenium and Apache HttpClient

The Selenium framework has become the standard for web browser automation, but at the time of writing this article, Selenium WebDriver doesn’t include a built-in method for downloading files from the web. Problem Description Consider the following scenario: You’re writing an automation script that’s supposed to perform […]

Read more

Jenkins Integration – Pulling From A Git Private Repository

Integrating Jenkins with Git is not a complicated task by itself and can be achieved by using all kinds of Jenkins plugins that will be discussed later on, As long as you are pulling your code from a Git public repository it is indeed a simple task, […]

Read more

Jenkins Integration – Parameterized Job

Run Jsystem Code with Parameters In the previous tutorial we have configured a maven build step that runs Jsystem’s test code with the following command: org.jsystemtest:jsystem-maven-plugin:run -Dscenario=scenarios/default -Dsut=default.xml in this case the scenario and the SUT are “hard coded” into the job’s configuration, which can be fine, but […]

Read more

Jenkins Integration – Simple Project

Jenkins Configuration Bear in mind that the next steps we will configure a simple job that runs on Jenkins’ machine Go to Jenkins -> Manage Jenkins -> Jenkins Configuration. This page allows us to configure Jenkins’ basic configuration JDK Under JDK click JDK Installation Click on Add […]

Read more

Integrating JMeter scripts with JSystem

Apache JMeter is a great open source tool designed for load testing and performance measurement of web applications and web services. For those of you wishing to bring together the strengths of JMeter and JSystem, here is a short tutorial describing the methods that me and my team […]

Read more

Activating Junit tests from Command Line

Running Junit tests from command line requires two things.
1) setting your classpath.
2) invoking the junit command.

you’ll need the following elemements in your CLASSPATH:

* JUnit class files
* Your class files, including your JUnit test classes
* Libraries your class files depend on

Windows Example:
set CLASSPATH=%JUNIT_HOME%\junit.jar;c:\myproject\classes;c:\myproject\lib\something.jar

Unix (bash) Example:
export CLASSPATH=$JUNIT_HOME/junit.jar:/myproject/classes:/myproject/lib/something.jar

Read more

Running JSystem scenario from command line

JSystem scenario is an ant script so running a scenario from command line is as simple as running ant script.

  1. Change directory to the runner installation folder (for example c:\jsystem\runner)
  2. Set ANT_HOME environment parameter
  3. When running on Linux Change ant batch file permission (chmod a+x ./thirdparty/ant/bin/ant)
  4. Make sure an empty ".testPropertiesFile_Empty" file exists under runner root folder


Read more

Jars order in runner & tests classpath

When the runner starts it collects jars from the following folders in the following order:

1. runner/thirdparty/ant/lib
2. runner/thirdparty/commonLib
3. runner/thirdparty/lib
4. runner/customer_lib
5 .runner/lib
6. {automationProject}/lib

The way to affect the order of jars in the classpath is to move them between the folders above.
(for example jar in runner/customer_lib will be precede in the classpath jar in runner/lib folder)

Read more

Remote debugging jsystem tests

To debug the runner/test running on a remote machine do the following:

1. To debug the runner, add the following java property to runner activation command:
-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y
2. To debug a test Add the above line to the property test.vm.params in the; this will allow you to debug test execution.

Read more
Fork me on GitHub