Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support --report-time CLI option for writer::Libtest (#264) #265

Merged
merged 5 commits into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@ All user visible changes to `cucumber` crate will be documented in this file. Th

- Added `Log` variant to `event::Scenario`. ([#258])
- Added `embeddings` field to `writer::json::Step` and `writer::json::HookResult`. ([#261])
- Added `report_time` field to `writer::libtest::Cli`. ([#264], [#265])

### Added

- [`tracing`] crate integration behind the `tracing` feature flag. ([#213], [#258], [#261])
- Support of `--report-time` CLI option for `writer::Libtest`. ([#264], [#265])

[#213]: /../../issues/213
[#258]: /../../pull/258
[#261]: /../../pull/261
[#264]: /../../issues/264
[#265]: /../../pull/265



Expand Down
2 changes: 1 addition & 1 deletion book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
- [Cucumber JSON format](output/json.md)
- [Multiple outputs](output/multiple.md)
- [`tracing` integration](output/tracing.md)
- [IntelliJ Rust integration](output/intellij.md)
- [IntelliJ Rust (`libtest`) integration](output/intellij.md)
- [Architecture](architecture/index.md)
- [Custom `Parser`](architecture/parser.md)
- [Custom `Runner`](architecture/runner.md)
Expand Down
2 changes: 1 addition & 1 deletion book/src/output/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ This chapter describes possible way and tweaks of outputting test suite results.
3. [Cucumber JSON format](json.md)
4. [Multiple outputs](multiple.md)
5. [`tracing` integration](tracing.md)
6. [IntelliJ Rust integration](intellij.md)
6. [IntelliJ Rust (`libtest`) integration](intellij.md)
18 changes: 16 additions & 2 deletions book/src/output/intellij.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
IntelliJ Rust integration
=========================
IntelliJ Rust (`libtest`) integration
=====================================

[`writer::Libtest`] (enabled by `libtest` feature in `Cargo.toml`) allows [IntelliJ Rust] plugin to interpret output of [`cucumber`] tests similar to unit tests. To use it, just add [Cargo configuration][1] (current example uses `cargo test --test wait --features libtest` command) or run it via [Cargo command][2]. This automatically adds `--format=json` CLI option, which makes the [`cucumber`]'s output IDE-compatible.

Expand Down Expand Up @@ -40,7 +40,18 @@ World::cucumber()



## `libtest` support

Only a small subset of [`libtest`] harness is supported to integrate with other tools:
- Only [`--format=json`][5] output ([`JUnit` support is done separately](junit.md));
- [`--report-time`][6] option;
- [`--show-output`][7] option.




[`cucumber`]: https://docs.rs/cucumber
[`libtest`]: https://doc.rust-lang.org/rustc/tests/index.html
[`writer::Basic`]: https://docs.rs/cucumber/*/cucumber/writer/struct.Basic.html
[`writer::Libtest`]: https://docs.rs/cucumber/*/cucumber/writer/struct.Libtest.html
[Cargo workspace]: https://doc.rust-lang.org/cargo/reference/workspaces.html
Expand All @@ -51,3 +62,6 @@ World::cucumber()
[2]: https://plugins.jetbrains.com/plugin/8182-rust/docs/cargo-command-configuration.html
[3]: https://github.com/intellij-rust/intellij-rust/issues/9041
[4]: https://github.com/rust-lang/cargo/issues/3946#issuecomment-973132993
[5]: https://doc.rust-lang.org/rustc/tests/index.html#--format-format
[6]: https://doc.rust-lang.org/rustc/tests/index.html#--report-time
[7]: https://doc.rust-lang.org/rustc/tests/index.html#--show-output
Loading