Saros Testing Framework (STF)
For further information about STF take a look at the STF User Manual. This document is not up-to-date, but still contains useful information about the STF.
You need a development environment with Eclipse 4.6 which is currently the only supported eclipse version.
- Before you can run the stf tests you need four XMPP accounts. If you want to use our XMPP server you can create accounts as described in the user documentation.
- Then you have to create the file
- Add the following lines to the config and replace the placeholders with your credentials (make sure every tester has an unique JID)
ALICE_JID = <insert user here>@<insert domain here>/Saros ALICE_PASSWORD = <insert password here> ALICE_HOST = localhost ALICE_PORT = 12345 BOB_JID = <insert user here>@<insert domain here>/Saros BOB_PASSWORD = <insert password here> BOB_HOST = localhost BOB_PORT = 12346 CARL_JID = <insert user here>@<insert domain here>/Saros CARL_PASSWORD = <insert password here> CARL_HOST = localhost CARL_PORT = 12347 DAVE_JID = <insert user here>@<insert domain here>/Saros DAVE_PASSWORD = <insert password here> DAVE_HOST = localhost DAVE_PORT = 12348
Eclipse uses the
META-INF/MANIFEST.MF in order to resolve dependencies inside the launch config.
Therefore the current workaround is to execute the gradle task
generateLibAll in order to generate a directory
lib that contains the required dependencies.
- Start the requiered launch configurations which are located
in the directory
test/resources/launchby right clicking the launch file and chose Run As > Saros_STF_<name>. This will start a new Eclipse instance with the selected launch configuration. You only need to run the appropriate launch file(s). E.g. the test
AccountPreferenceTest.javain the package
saros.stf.test.accountonly needs the tester ALICE. In this case you only need to start Saros_STF_Alice.
- Right click on the test you want to run and select Run As > JUnit test
We are currently working on an version of STF that work with the HTML-GUI and therefore with both IDEs, but for now it is not possible to run the Eclipse STF tests from within IntelliJ or execute STF tests for IntelliJ. However Intellij/Gradle supports to run multiple intellij instances from within intellij in order to test Saros by hand.
Run multiple Intellij instances for testing
- Open the
- Open the task directory
saros.intellij > Tasks > intellij
- Execute task
runIdefor each IntelliJ IDEA instance you need.
Each simultaneously execution of
runIde creates a sandbox directory in the
build directory of the intellij project.
If you want to configure the parent directory of the sandbox directories you have to set the environment variable
to the corresponding directory.
Without an IDE
Test IntelliJ by hand
If you want to test IntelliJ by hand simply call the gradle task
./gradlew runIde as within IntelliJ. If you close the IntelliJ instance
by killing the gradle process per terminal the intellij workspaces cannot be reused. Therefore you should close the instances by closing the IDE window.
Start Eclipse STF tests
If you want to execute the Eclipse STF tests without an IDE you can use the docker setup which is used in the CI server. In order to use the corresponding script you need a current docker installation.
- Open a bash terminal
- Change the current working directory to the Saros repository root directory
- Create the directory
stf_wswhich is used by the containers to store test artifacts
export CONFIG_DIR=travis/config SCRIPT_DIR=travis/script/stf
- Create the required docker contains by executing
- Start the stf tests by executing
docker exec -t stf_master /home/ci/saros_src/travis/script/stf/master/start_stf_tests.sh
Clean test environment
In order to clean the environment you have to stop and remove all created containers and remove the network.
- Stop and remove containers
docker rm -f stf_slave_1 stf_prosody_test.org stf_master
- Remove network
docker network rm stf_test_network
- Remove the
View eclipse test instances
If you want to see how the tests are performed you have install a vncviewer.
Start the vncviewer and connect to the vncservers running on the test container. You have to connect to host
localhost and the ports