Why all test files have 0.1s or 0s time execution for my CI build in user dashboard?
If you go to the user dashboard and open Build metrics
for your API token and you open CI build for your last git commit you should see info about collected time execution data from all CI nodes. If you see all test files have 0.1s or 0 seconds time execution then:
- For
knapsack_pro
version older than 3.1.0 you should not clean up thetmp
directory in your tests (for instance in RSpec hooks likebefore
orafter
) so thatknapsack_pro
can publish measured time execution data to the Knapsack Pro API server.knapsack_pro
Queue Mode (version < 3.1.0) saves temporary files with collected time execution data inyour_rails_project/tmp/knapsack_pro/queue/
directory.knapsack_pro
version >= 3.1.0 uses.knapsack_pro
directory for storing temporary files. - please ensure you have in your
rails_helper.rb
orspec_helper.rb
line that allows measuring tests execution time:
require 'knapsack_pro'
# CUSTOM_CONFIG_GOES_HERE
KnapsackPro::Adapters::RSpecAdapter.bind
The 0.1s is a default time execution used when the test file is an empty file or its content is all pending tests. This is true for knapsack_pro
version <= 2.11.0.
The default time execution for not executed tests is 0 seconds since knapsack_pro
>= 2.12.0.