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:
knapsack_proversion older than 3.1.0 you should not clean up the
tmpdirectory in your tests (for instance in RSpec hooks like
after) so that
knapsack_procan publish measured time execution data to the Knapsack Pro API server.
knapsack_proQueue Mode (version < 3.1.0) saves temporary files with collected time execution data in
knapsack_proversion >= 3.1.0 uses
.knapsack_prodirectory for storing temporary files.
- please ensure you have in your
spec_helper.rbline 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.