Launchers / Automated tests

SVN Launcher (svn.jar)

The svn launcher allows getting files from a subversion repository .
The launchers allows to:
  • Get all files from a SubVersioN repository
  • Manage this as a test, hence include it into a test campaign
This is useful when all of your tests scripts, codes and data are versioned through SVN.
This way, you can get all of the artifacts before executing your tests. Doing so, you are always sure to run the latest tests with up-to-date test data.
this also allows you to benefit from on-the-spot test servers that you can provision using vagrant or the likes
Note: we also have a launcher that is based on windows(TM) or Linux shell script interpreting arguments. But we recommend using this more specialized launcher for SVN
Latest test : On Windows 10-17134, Tortoise SVN version 1.10.0-dev (under development)
This version is initial (v1.0)

Configuration

The svn.xml file is just a template and must NOT be edited. It's used by the system to dynamically build the form that the user will be able to fill in from the GUI when creating a custom execution configuration.

Parameter Description
SVN
svn executor path (no ending slash) This must indicate where your svn execution is located - this enables you to avoid having to first modify you envrionment variables. This path MUST NOT include an ending slash.

Default value is: C:\Program Files\TortoiseSVN\bin
Export destination path (no ending slash) This tells where the extracted files will be located after Svn get them. this should be the test root path for teh tests you will execute later on.
Default value is: C:\myTestRootPath
Svn repo URL (no ending slash) This tells where is the Svn repo. This can be anything that Svn supports (https, Svn ...)
Default value is: ="svn://xxx.xxx.xxx.xxx/svn/xqual/xstudio/trunk

These values can be changed while creating the campaign session from XStudio.
Note about file path parameters:
Any parameter referring to a file or folder path (for instance Test root path) can be provided either using \ separator (if the tests are going to be executed on a Windows agent) or / separator (if the tests are going to be executed on a linux or MacOSX agent).

On windows, if you provide a path containing an OS-localizable folder such as C:\Program Files, always prefer the English version (i.e. NOT C:\Programmes if you're using a french-localized Windows) or the corresponding native environment variable (i.e. %PROGRAMFILES%).


Specific test attributes

It is possible to associate attributes to individual test. This launcher will recognize and use the following attributes:
  • com.xqual.svn.username (only works with http and https)
  • com.xqual.svn.password (only works with http and https)
  • com.xqual.svn.revision
  • com.xqual.svn.exportOrCheckout


com.xqual.svn.username

Allows specifying the credential USERNAME to connect to your http or https svn repositpory (if required) (see Tortoise SVN documentation for this)
This is setting the --username flag followed by the username you specify in the connection string
com.xqual.svn.password

Allows specifying the credential PASSWORD to connect to your http or https svn repositpory (if required) (see Tortoise SVN documentation for this)
This is setting the --password flag followed by the password you specify in the connection string
com.xqual.Svn.revision

Allows specifying the branch and revision from which to extract file - if not provided we get from the master . (see Tortoise SVN documentation for this)
This is setting the --revision flag in svn. By default this is set to HEAD
com.xqual.Svn.exportOrCheckout

Allows stating if we need to keep the files checked out or if this is an simple export. By default we recommend an export. (see Tortoise SVN documentation for this)
The export is true EXPORT as SVN supports this directly.

Process

1) The launcher will constitute and run the interpreter with the following templates:
<svn exe path>\Svn 'export' or 'checkout' ----revision <com.xqual.svn.revision> nor 'HEAD' ] <SVN repo URL (no ending slash)>/ --q --force [--username <com.xqual.Svn.username> ] [--username <com.xqual.Svn.password> ] --ignore-externals --no-auth-cache
Note: by only getting depth 1 , this limits the time and volume of data as we only need the latest test in general
2) all report files will be attached to the results if found
3) The launcher parses the specific SvnLogFile.txt trace file and use it to provide summarized information back to the testers


Permissions

WARNING: if you're running your tests on Windows, it may be required to run the tests as administrator.
Having an account with Administrators permissions may even not be enough in some cases (especially if you're using Windows 10) and you may need to disable completely the UAC (User Access Control) on your computer.
To do so:
  • Press the Windows + R key combination
  • Type in regedit
  • Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
  • In the right-side pane, look for EnableLUA and set the value 0
  • Close the registry editor
  • Restart your computer

Debug

If your tests are not executed correctly or are reporting only failures, this is very likely because your configuration is incorrect or because you used a wrong naming convention for your tests and test cases.

The best way to quickly find out what's wrong is to look at the traces generated by XStudio (or XAgent).
The traces always include the detailed description of what the launcher performs (command line execution, script execution, API calling etc.) to run a test case. So, if you experiment some problems, the first thing to do is to activate the traces and look at what's happening when you run your tests.

Then, try to execute manually in a cmd box the exact same commands.
This will normally fail the same way.
At this point, you needs to figure out what has to be changed in these commands in order to have them run properly.

When you have something working, compare these commands to what's described in the Process chapter above. This will tell you exactly what you need to change.

Most of the time, this is related to:
  • some incorrect values in some parameters of your configuration,
  • the name of your tests,
  • the name of your test cases,
  • the canonical path of your tests