Good day! I started using the BDDfire framework to write integration tests for my projects.

  • There are two different projects that are not related to themselves.
  • There is a separate repository, where relevant tests are described for these projects.

  • For each project, there are files with features (* .features) and files with implementation steps (step_definitions.rb). That is, two files for each project.

  • When running tests with the rake poltergeist command , all tests are executed.
  • I, in turn, want to run tests separately for each project.
  • In the documentation for cucumber, capybara, BDDfire nothing has been found yet.

I ask for help if someone faced a similar task and successfully solved it. Thank!

    1 answer 1

    You can mark different features and scenarios with tags (@ project1, @ project2, etc.) and slightly modify the rakefile. Adding this into it

    Cucumber::Rake::Task.new(:poltergeist_project1) do |t| // имя может быть любым ^^^^^^^^^^^^^^^^^^^^ t.cucumber_opts = 'features -p poltergeist --format pretty --profile html -t ~@api -t @project1' // это тег который вы добавили -> ^^^^^^^^^ end 

    Then at

     rake poltergeist_project1 

    tests will be performed tagged with @project1 tag

    • Thank you very much! I'm going to try now! - Aleksey_Orlov