-
Notifications
You must be signed in to change notification settings - Fork 64
SpecFlow
Run the SpecFlow test runner.
specflow :test_report => [:test] do |cmd|
cmd.command = "path/to/specflow"
cmd.report = :nunitexecutionreport
cmd.project = "path/to/proj"
end
The path to the specflow console runner.
command = "path/to/specflow"
The SpecFlow report to run: :nunitexecutionreport
, :mstestexecutionreport
, & :stepdefinitionreport
. Oh, all right, you could use this to run :generateall
if you really need to, as well.
report = :nunitexecutionreport
The project file containing the feature files.
project = "path/to/proj"
(none)
If you want to run the same SpecFlow report for multiple projects, there's an easy way. We didn't mess with this one, like the XUnit test runner, which also only supports one assembly per command line invocation (internally, we loop over the assemblies and run a shell command per).
Define a separate task for each of your acceptance test projects and you can use the Rake FileList
to make the matching easy.
acceptance_tests = FileList["source/**/*.AcceptanceTests.csproj"]
acceptance_tests.each do |proj|
specflow proj => [:test] do |cmd|
cmd.command = "tools/specflow/specflow.exe"
cmd.report = :nunitexecutionreport
cmd.project = proj
end
end
This way, you can also depend on the whole set of acceptance test reporting tasks easily
output :out => acceptance_tests do |out|
# ...
end