Using SpecSync on OSX/Linux
SpecSync can synchronize any scenarios that are written in Gherkin format. The synchronization tool works on Windows, OSX and Linux. (The OSX and Linux support has been introduced in v1.4.)
In order to use the SpecSync for TFS command line tool on OSX or Linux, there are two options.
1. Using SpecSync command line tool as a native binary (on Linux only)
The command line tool can be used as a native binary on Linux systems (tested on Ubuntu) and it does not require any special dependencies (like Mono) to be installed.
This option can also be used with Docker, we have tested it successfully on a pure ubuntu image.
For this option, you have to
- Download SpecSync from the downloads page (SpecSync.Mono.VER.zip) and unzip it to a folder on your system.
- (optional) Set an environment variable pointing to the unzipped
SpecSync.Mono
folder: e.g.export SPECSYNC_DIR=$HOME/SpecSync.Mono
(if unzipped in$HOME
) - Mark
SpecSync4MTM
as executable:chmod +x $SPECSYNC_DIR/SpecSync4MTM
- Copy the file
libMonoPosixHelper.so
from the SpecSync folder to the project folder (this is a temporary limitation):cp $SPECSYNC_DIR/libMonoPosixHelper.so .
- From the project folder, invoke
SpecSync4MTM
to synchronize feature files. For non-SpecFlow projects, use the--listFilePath
setting to specify the feature files to be synchronized (see more on page Using SpecSync with Cucumber): e.g.find Features/ -name *.feature | $SPECSYNC_DIR/SpecSync4MTM --listFilePath STDIN --tfsUrl ...
A sample script performing steps 4-5 can also be found in the zip file: specsync4mtm_sample.sh
, similar to the following.
#!/bin/bash
SPECSYNC_DIR=$HOME/SpecSync.Mono
TFS_URL=<add your TFS project URL here, like https://gasparnagy.visualstudio.com/DefaultCollection/SpecSync4MTM.Demo>
TFS_USER=<add your TFS user name here>
TFS_PWD=<add your TFS password here>
echo Copy libMonoPosixHelper.so to the current folder
cp $SPECSYNC_DIR/libMonoPosixHelper.so .
echo Synchronize feature files within "Features" folder
find Features/ -name *.feature | $SPECSYNC_DIR/SpecSync4MTM --tfsUrl $TFS_URL --listFilePath STDIN --user $TFS_USER --password $TFS_PWD
echo Delete libMonoPosixHelper.so from the current folder
rm -f libMonoPosixHelper.so
2. Using SpecSync command line tool with Mono
If the system has Mono installed, SpecSync can also be invoked through Mono. To install Mono runtime, visit http://www.mono-project.com/docs/getting-started/install/.
This option can also be used with Docker, we have tested it successfully on the mono image.
For this option, you have to
- Download SpecSync from the downloads page (SpecSync.Mono.VER.zip) and unzip it to a folder on your system.
- (optional) Set an environment variable pointing to the unzipped
SpecSync.Mono
folder: e.g.export SPECSYNC_DIR=$HOME/SpecSync.Mono
(if unzipped in$HOME
) - From the project folder, invoke
$SPECSYNC_DIR/Assemblies/SpecSync4MTM.exe
to synchronize feature files. For non-SpecFlow projects, use the--listFilePath
setting to specify the feature files to be synchronized (see more on page Using SpecSync with Cucumber): e.g.find Features/ -name *.feature | mono $SPECSYNC_DIR/Assemblies/SpecSync4MTM.exe --listFilePath STDIN --tfsUrl ...
A sample script performing step 3 can also be found in the zip file: specsync4mtm_sample.sh
, similar to the following.
#!/bin/bash
SPECSYNC_DIR=$HOME/SpecSync.Mono
TFS_URL=<add your TFS project URL here, like https://gasparnagy.visualstudio.com/DefaultCollection/SpecSync4MTM.Demo>
TFS_USER=<add your TFS user name here>
TFS_PWD=<add your TFS password here>
echo Synchronize feature files within "Features" folder
find Features/ -name *.feature | mono $SPECSYNC_DIR/Assemblies/SpecSync4MTM.exe --tfsUrl $TFS_URL --listFilePath STDIN --user $TFS_USER --password $TFS_PWD