3

想知道是否可以将测试标记为多种类型,例如:

  it 'should run as part of smoke or integration tests', :type => 'smoke,integration' do
    response = @sample_request.echo("EXAMPLE5", "EXAMPLE6")
    expect(response.status).to equal(200)
  end

并在应用两个过滤器中的任何一个时运行它:

bundle exec rspec --tag type:smoke

或者

bundle exec rspec --tag type:integration
4

1 回答 1

3

您应该能够使用数组来执行此操作。

it '...', :type => ['smoke', 'integration'] do

于 2020-10-19T13:55:39.890 回答