Comments (10)
There is 400 lines in our report and the test being executed is only 329(405 executed, 329 actual all others seems to be duplicate as from the output). So I was wondering if there is a way to figure out which one are skipped automatically.
from knapsack.
As I can see from the code is it because of the sorting of how the reported test are read from the report? maybe we need a sort there also?
from knapsack.
As I can see from the code is it because of the sorting of how the reported test are read from the report? maybe we need a sort there also?
Could you provide link to the part of the code you mean?
I was wondering is there a way to check what's the files being executed?(is it only possible to look through the output in the CI pipeline)
You can run bundle exec rake knapsack:minitest
and see knapsack logger output with list of tests that are going to be executed. Leftover tests are those not in knapsack report yet.
https://github.com/ArturT/knapsack/blob/master/lib/knapsack/runners/minitest_runner.rb#L8
There is 400 lines in our report and the test being executed is only 329(405 executed, 329 actual all others seems to be duplicate as from the output). So I was wondering if there is a way to figure out which one are skipped automatically.
If you removed or renamed the file spec/requests/api/artists_spec.rb
from your repository then knapsack won't run it because it checks whether the test file found in the knapsack report actually exists.
If test file exists in test directory but not in knapsack report then the test file will be run (it's called leftover test).
If you want to track newly added or renamed test files just try https://knapsackpro.com for a few week or so and compare results with what you have now.
from knapsack.
The file is there and its in the report but its not executed(from the output on CI, no pipeline have it) and from the output I get from the CI, i found that there are some files that are running multiple times across different nodes. The line I talked about is https://github.com/ArturT/knapsack/blob/516aedd5ecf3bd0c900ca00e9da22d139e0f7d1d/lib/knapsack/distributors/leftover_distributor.rb#L5
From what I get the total number of test that got ran is correct but as there is so many duplicate a lot are actually skipped(for the output of file name that get executed 76 duplicates are there).
from knapsack.
- Do you use custom pattern
KNAPSACK_TEST_FILE_PATTERN
? - Do you see duplicated files in knapsack report json?
- You could fork gem and try add uniq here
report.keys.uniq
https://github.com/ArturT/knapsack/blob/516aedd5ecf3bd0c900ca00e9da22d139e0f7d1d/lib/knapsack/distributors/leftover_distributor.rb#L5 and see how it works for you.
from knapsack.
We have KNAPSACK_TEST_FILE_PATTERN="spec/**{,/*/**}/*_spec.rb"
no duplicate in the report.json file
from knapsack.
Thanks for your help got it fixed.
from knapsack.
Adding report.keys.uniq
solved the problem? https://github.com/Vydia/knapsack/commit/566ef35123f8f8839067db27f36ce5435088e22d
Could you provide more context about the investigation you did? Is there a real bug in the gem then I'd like to fix that. If not then what was the root of your problem then?
from knapsack.
some of the configuration for running the test was wrong so however one of the pipeline is not executed on the CI. Its not a real bug.
from knapsack.
OK. Thank you!
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.