3.0.255
<specFlow>
<unitTestProvider name="SpecRun" /><plugins>
<add name="SpecRun" />
</plugins>
</specFlow>
We just updated a solution to the new SpecfFlow version and we are throwing an error running from command line in Jenkins
Previous:
cd MyPath\packages\SpecRun.Runner.1.8.5\tools
SpecRun.exe run Jenkins/MyProfle.srprofile /baseFolder:%WORKSPACE%/Tests/bin/debug /filter:"@Tag" /log:specrun.log
This has worked fine for years.
New:
cd MyPath\packages\SpecRun.Runner.3.0.255\tools\net45
SpecRun.exe run Jenkins/MyProfle.srprofile /baseFolder:%WORKSPACE%/Tests/bin/debug /filter:"@Tag" /log:specrun.log
The path changed with the new version and specrun.exe is now in net45 folder. We throw an error for the path being invalid (shown below) but path in the error is invalid since these components are not in the net45 nuget package.
In an effort to make this easier to test, I ended up opening a local command prompt to debug.
open cmd prompt:
go to specrun.exe folder
enter path to *.srprofile
E:>cd E:\MyPath\packages\SpecRun.Runner.3.0.255\tools\net45
Run: SpecRun.exe run E:\MyPath\Tests\bin\Debug\Jenkins\MyProfile.srprofile /baseFolder:E:\MyPath\Tests\bin\Debug /filter:"@MyTag" /log:specrun.log
error:
Result: test framework error: Could not find a part of the path 'E:\MyPath\packages\SpecRun.Runner.3.0.255\tools\net45\SpecFlowPlusRunner\net45'.
So in the error, where/why is "SpecFlowPlusRunner\net45" showing up? This folder does not exist in SpecRun.Runner.
We changed the command line parser in SpecFlow+Runner 3. The parameters are now prefixed with a -- and not a / anymore.
See https://specflow.org/plus/documentation/SpecFlowPlus-Runner-Command-Line/
I noticed that we forgot that to mention in the release notes. @Stephen-Mc could you please add an entry for it. Thanks!
Thanks SabotageAndi. Is there any issue with running on an E: drive? This is the call we were making in Jenkins but I wanted to run it locally first and I am failing with the below. The paths are valid and I have tried with and without the quotes on the path for grins.
E:\Automation\Path\Path\packages\SpecRun.Runner.3.0.255\tools\net45>SpecRun.exe run "E:\Automation\Path\Path\Tests\bin\Debug\Jenkins\Automation.srprofile" --baseFolder:"E:\Automation\Path\Path\Tests\bin\Debug" --report:MyReport.html
SpecRun 3.0.255+ged0e2a648f
Copyright c 2011-2019 TechTalk
ERROR(S):
Option 'baseFolder:E:\Automation\Path\Path\Tests\bin\Debug' is unknown.
Option 'report:MyReport.html' is unknown.
--baseFolder Base folder for executing the tests. All paths specified are relative to this.
--outputFolder Base folder for test outputs (relative to base folder), default: base folde.
--log Path for log file (relative to output folder).
--report Path for the generated report (relative to output folder).
--filter Filter expression (overrides profile setting), e.g. "@mytag & !@othertag".
--toolIntegration Used for tool integration
--debug Used for tool integration.
--help Display this help screen.
--version Display version information.
value pos. 0 Required. Assembly or test profile (.srprofile).
Not that I am aware of it.
I am not sure if the : are still needed after the parameter.
@david1995 do you know?
I removed them and it is running now. Your docs were updated to use -- but the colon is still there so you may want to update.
Appreciate the help as always!
https://specflow.org/plus/documentation/SpecFlowPlus-Runner-Command-Line/
@Stephen-Mc could you please update the docs, thanks!
I've updated the docs and added a note the the release announcement about the change in syntax
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.