You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature: Do a foo@fooScenario Outline: I can do a fooGiven I have a <thing>Then I can do foo
Examples:
| thing | | 1 | | 2 | | 3 | | 4 | | 5 |
This works when I run:
$ cargo test --test my_foo -- --tags=@foo
However, the tests are very long running, and there are quite a lot of them. I would like to split some examples into @smoke, which will run for CI jobs, and @nightly, which will only run on a nightly cron. Something like:
Feature: Do a foo@fooScenario Outline: I can do a fooGiven I have a <thing>Then I can do foo
@smokeExamples:
| thing | | 1 | | 2 |@nightlyExamples:
| thing | | 3 | | 4 | | 5 |
Where smoke jobs will run with:
$ cargo test --test my_foo -- --tags='@foo and @smoke'
Problem 1:
This causes a parsing error:
1 parsing error
thread 'main' panicked at '1 parsing error', /Users/taylor.smith/.cargo/registry/src/github.com-1ecc6299db9ec823/cucumber-0.10.2/src/cucumber.rs:1316:13
stack backtrace:
0: rust_begin_unwind
at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:517:5
1: core::panicking::panic_fmt
at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/panicking.rs:101:14
2: cucumber::cucumber::Cucumber<W,P,I,R,Wr,Cli>::filter_run_and_exit::{{closure}}
at /Users/taylor.smith/.cargo/registry/src/github.com-1ecc6299db9ec823/cucumber-0.10.2/src/cucumber.rs:1316:13
3: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/future/mod.rs:80:19
4: cucumber::cucumber::Cucumber<W,P,I,R,Wr,Cli>::run_and_exit::{{closure}}
at /Users/taylor.smith/.cargo/registry/src/github.com-1ecc6299db9ec823/cucumber-0.10.2/src/cucumber.rs:1207:9
5: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/future/mod.rs:80:19
6: ml_smoke::main::{{closure}}
at ./tests/ml_smoke.rs:44:5
7: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/future/mod.rs:80:19
8: tokio::park::thread::CachedParkThread::block_on::{{closure}}
at /Users/taylor.smith/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.13.0/src/park/thread.rs:263:54
9: tokio::coop::with_budget::{{closure}}
at /Users/taylor.smith/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.13.0/src/coop.rs:106:9
10: std::thread::local::LocalKey<T>::try_with
at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/thread/local.rs:399:16
11: std::thread::local::LocalKey<T>::with
at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/thread/local.rs:375:9
12: tokio::coop::with_budget
at /Users/taylor.smith/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.13.0/src/coop.rs:99:5
13: tokio::coop::budget
at /Users/taylor.smith/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.13.0/src/coop.rs:76:5
14: tokio::park::thread::CachedParkThread::block_on
at /Users/taylor.smith/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.13.0/src/park/thread.rs:263:31
15: tokio::runtime::enter::Enter::block_on
at /Users/taylor.smith/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.13.0/src/runtime/enter.rs:151:13
16: tokio::runtime::thread_pool::ThreadPool::block_on
at /Users/taylor.smith/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.13.0/src/runtime/thread_pool/mod.rs:77:9
17: tokio::runtime::Runtime::block_on
at /Users/taylor.smith/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.13.0/src/runtime/mod.rs:463:43
18: ml_smoke::main
at ./tests/foo_test.rs:44:5
19: core::ops::function::FnOnce::call_once
at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
error: test failed, to rerun pass '--test ml_smoke'
Problem 2:
I collapsed the examples just to try to narrow down the problem. It appears cucumber-rs cannot handle tags on the Examples section, as this runs zero tests:
Feature: Do a foo@fooScenario Outline: I can do a fooGiven I have a <thing>Then I can do foo
@smokeExamples:
| thing | | 1 | | 2 | | 3 | | 4 | | 5 |
$ cargo test --test my_foo -- --tags='@foo and @smoke'
[Summary]
0 features
0 scenarios
0 steps
Even this didn't work:
$ cargo test --test my_foo -- --tags='@smoke'
[Summary]
0 features
0 scenarios
0 steps
NOTE it is worth mentioning this is 100% supported by Godog (Golang) and behave (Python). Since the setup steps in my actual case are fairly verbose, it would be wasteful to copy/paste an entirely new Scenario Outline with the @nightly tag.
The text was updated successfully, but these errors were encountered:
@tgsmith61591 thanks for looking into it. It's very helpful to see people experienced in other cucumber implementations.
First problem mainly comes from gherkin not having strict specification and different implementations supporting different features. I'll try to fix this in gherkin-rust crate, but I'm not sure this won't break anything.
Second problem is in this crate and should be an easy and fast fix.
Version: 0.10.2
I have a feature file that resembles:
This works when I run:
$ cargo test --test my_foo -- --tags=@foo
However, the tests are very long running, and there are quite a lot of them. I would like to split some examples into
@smoke
, which will run for CI jobs, and@nightly
, which will only run on a nightly cron. Something like:Where smoke jobs will run with:
Problem 1:
This causes a parsing error:
Problem 2:
I collapsed the examples just to try to narrow down the problem. It appears
cucumber-rs
cannot handle tags on theExamples
section, as this runs zero tests:Even this didn't work:
NOTE it is worth mentioning this is 100% supported by Godog (Golang) and behave (Python). Since the setup steps in my actual case are fairly verbose, it would be wasteful to copy/paste an entirely new
Scenario Outline
with the@nightly
tag.The text was updated successfully, but these errors were encountered: