Comments (5)
@greggroth Hi, I've just did quick test and pattern works in case when .feature
file has rspec tests.
I guess your .feature
file has cucumber test inside so in that case you need to generate a separate report for cucumber tests and use cucumber adapter:
https://github.com/ArturT/knapsack#step-for-cucumber
from knapsack.
The specs are written using the gherkin syntax, but are ran using rspec, e.g. bin/rspec spec/features/logging_in.feature
. Would that still require a separate report? I would think it would be included in the rspec report.
https://github.com/jnicklas/turnip
from knapsack.
Hmm, so it looks like rspec hooks were not fired and that's why report doesn't have .feature
files.
https://github.com/ArturT/knapsack/blob/master/lib/knapsack/adapters/rspec_adapter.rb#L9
Maybe you are using a separate spec_helper.rb for .feature
and you missed to bind there Knapsack::Adapters::RspecAdapter
.
If I will find some time during weekend I can prepare test suite with turnip to debug the problem unless you will figure out it earlier.
from knapsack.
Thank you for the hint! I dug in and found it's an issue with Knapsack::Adapters::RspecAdapter.test_path
's ability to parse the filename from example metadata. This is when running a turnip feature:
pry(#<RSpec::ExampleGroups::REDACTED::REDACTED>)> Knapsack::Adapters::RspecAdapter.test_path(::RSpec.current_example.metadata[:example_group])
=> "/Users/greggory/.gem/ruby/2.2.2/gems/turnip-1.2.4/lib/turnip/rspec.rb"
and with a normal spec file:
[1] pry(#<RSpec::ExampleGroups::REDACTED::REDACTED::REDACTED>)> Knapsack::Adapters::RspecAdapter.test_path(::RSpec.current_example.metadata[:example_group])
=> "./spec/models/user_spec.rb"
I'll dig in further and see if I can't put together a PR to improve this.
from knapsack.
Cool. You may want to take a look how I get the test file path in other adapters
https://github.com/ArturT/knapsack/tree/master/lib/knapsack/adapters
Please let me know if you will have something. In case you stuck I will help with that.
from knapsack.
Related Issues (20)
- .rspec config looks ignored even in Regular Mode HOT 2
- Knapsack::Adapters::RSpecAdapter does not track time spent in `before` or `after` `:context` HOT 3
- Time execution for pending test file can't be measured due to exception HOT 1
- Cucumber split by scenario and not feature HOT 1
- how often to update knapsack_minitest_report.json timings report HOT 4
- knapsack is skipping some rspecs HOT 3
- Segmentation error under ruby 2.5.0 HOT 2
- How can this be used with the Kubernetes Jenkins Plugin that dynamically creates Jenkins slaves HOT 1
- `uninitialized constant ActiveSupport` with Minitest runner HOT 3
- send complete test coverage report from circleCI building specs to codeclimate HOT 3
- Knapsack does handle signals
- Generate report on minitest HOT 7
- All tests run when no spec files are found HOT 3
- cucumber runner exits with non-zero code even though tests passed HOT 12
- Some cucumber test files run via several CI jobs HOT 5
- Knapsack not generating report for rspec HOT 4
- Knapsack report not found by one job on GitLab CI HOT 5
- Hide Knapsack Time Offset Warning block? HOT 1
- Feature Request: Prioritise spec files HOT 1
- Load Balancing Algorithm doesn't consider weight of nodes HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from knapsack.