Commit Graph

151 Commits

Author SHA1 Message Date
Cody Cutrer 34c2f3c2d7
don't use OpenStruct (#7)
it's getting removed from Ruby
2024-06-11 10:10:19 -06:00
Cody Cutrer d7fa5536da make compatible with redis 5.0 2023-09-27 10:50:36 -06:00
jbutte 144a188a33
Merge pull request #5 from kyler-instructure/add_specific_build_time
Add specific build time
2022-02-02 12:06:24 -07:00
James Butters 8cea6a3225 convert to integer 2022-02-02 10:11:05 -07:00
James Butters e4b950c8ec store as miliseconds 2022-02-02 09:44:38 -07:00
James Butters e24865420b set key_build_time 2022-02-02 08:41:56 -07:00
James Butters 37c336f366 add build times specific for each build id 2022-02-02 07:33:29 -07:00
jbutte b86e1fd21c
Merge pull request #3 from kyler-instructure/suppress_output
Suppress output
2022-01-03 13:02:26 -07:00
jbutte a38dd12b3a
Merge pull request #4 from rmsy/suppress_output
Switch from `sentry-raven` to `sentry-ruby`
2022-01-03 12:57:45 -07:00
Isaac Moore 0e3e8c7ce7 Switch from `sentry-raven` to `sentry-ruby`
Fixes skroutz/rspecq#68
2022-01-03 10:08:15 -06:00
James Butters 8e8fef4f56 Merge branch 'junit_report_initial_failure' into suppress_output 2021-12-20 04:34:50 -07:00
James Butters 9c6cb347db add option to suppress output when running files_to_example_ids
if you have any custom console outputs as part of your rspec
config or setup, the json parser will fail to parse that output
and fail the build. Adding SUPPRESS_OUTPUT=1 so we can check for
that env var and suppress any unnecessary console outputs.
2021-12-06 09:59:19 -07:00
James Butters baeb5c6394 distinguish between requeued passed and requeued failed
distinguish between passed and failed requeued to remove from the
junit report. Add example_passed in the formatter registration.
2021-11-10 17:49:18 -07:00
James Butters 70942f7de7 use ENV['ERROR_CONTEXT_BASE_PATH'] to determine junit reporting 2021-11-10 13:49:39 -07:00
James Butters 577c3095c5 report the initial run even if failure, do not report the requeues 2021-11-10 11:30:13 -07:00
James Butters a49343fa7e add is_requeue check
if job is a requeue set the ERROR_CONTEXT_BASE_PATH to rerun number
2021-10-06 10:14:18 -06:00
James Butters b5a638f114 modify regex for trimming job name
flaky_jobs_to_sentry fails if the specs are not in the
spec/ dir. Modified the regex to not specifically look
for spec/ but rather just remove the ./ at the beginning
and [] at the end.
2021-09-09 11:47:56 -06:00
James Butters fddf75c768 Merge branch 'rspec-args' of https://github.com/kyler-instructure/rspecq into rspec-args 2021-08-18 18:52:37 -06:00
James Butters 1152c8c579 reporter respect the queue-wait-timeout option
currently the reporter does not respect the queue-wait-timeout
option. Send that option to the reporter initializer.
2021-08-18 18:50:31 -06:00
Kyle Rosenbaum d320441ecd add rspecq include and exclude patterns 2021-08-10 09:31:42 -07:00
Rob Christie 7c16e65b4a Rename junit-formatter option to junit-output. 2021-07-15 11:26:15 -07:00
Rob Christie acae702c45 Add ability to define formatter file name and path. 2021-07-15 11:23:04 -07:00
Rob Christie 412ed0d1c1 Add support for rspec parallel multiple files. 2021-07-15 11:20:34 -07:00
Rob Christie 5ed7b55512 Cleanup debugging. 2021-07-15 11:19:50 -07:00
Rob Christie 4e4fc462db Add junit formatter. 2021-07-15 11:13:13 -07:00
Rob Christie 6388ca51ec Fix counter. 2021-07-15 11:10:07 -07:00
Rob Christie 9b77993ab5 Add suite to filename when option is set. 2021-07-15 11:09:45 -07:00
Rob Christie 30459925f9 WIP formatter output with job id 2021-07-15 11:03:37 -07:00
Jacob Smith b3c96bd51c Pass through rspec arguments 2021-07-15 10:40:46 -07:00
John Fragoulis 281c4d2a51 Bump version to 0.7.1 2021-04-08 13:03:57 +03:00
John Fragoulis 2edcc280e5 Allow users to have shorter flaky report
The rerun command for the flaky tests can be pretty big. This becomes
a bigger problem when there are more flaky tests appearing.

We allow users to skip the rerun command from the summry report by
setting the env variable `RSPECQ_REPORTER_RERUN_COMMAND_SKIP`. The location
and worker are still repoted.

The sentry payload remains the same.
2021-04-08 13:03:30 +03:00
John Fragoulis ff395e1f51 Update CHANGELOG for #64 2021-04-01 16:14:53 +03:00
John Fragoulis 06b7a7596d Bump version to 0.7.0 2021-04-01 16:13:53 +03:00
John Fragoulis c1457c762b Help users reproduce flaky tests
Originally, a flaky test would appear in the report by its just example id
which is not helpful at all.

Then we merged 9f6816e which tried to replace the flaky example id with a
reproduction command. The command did not work however because the premise
was wrong. You see, to correctly reproduce a flaky test you need more than
the seed and the test file. You also need all the files the preceded the
flaky test, up to the point in time when you reset rspec and the databases.
For rspecq, this point in time is the start of a worker.

Both of the above issues are mitigiated:
1. Flaky tests are reported by their example location, which by itself does
not offer anything, but at least it shows the developer which test exactly
is flaky.
2. Provides a reproduction command for each flaky test, which is the gist.

The reproduction (or rerun) command, consists of the seed and the files originally tested by the worker when the test failed.
2021-04-01 16:07:17 +03:00
John Fragoulis 6f53a305a8 Introduce 'reproduction' argument
The new argument modifies how the rspecq worker publishes the files and
examples to the queue.

By detault it first merges individual examples into files and then
depending on whether the `update-timings` is passed, it will either
publish based on the timings or randomly shuffly them.

If the `reproduction` argument is passed, the worker will ignore timings and
randomness and will publish the files exactly as given.

This feature is very important in order for a developer to be able to
successfully reproduce a flaky test as reported by the reporter in a previous
run.
2021-04-01 16:07:17 +03:00
John Fragoulis 5966409f72 Revert "Display reproduction command for flakey tests"
This reverts commit 9f6816e4f8.
2021-04-01 13:32:30 +03:00
John Fragoulis 928289af35 Include 'seed' argument in README 2021-04-01 13:32:15 +03:00
John Fragoulis 36dc9376b8 Allow rspecq to accept more than one files/locations as arguments 2021-03-31 17:55:09 +03:00
John Fragoulis 773b0fb95f Do not send irrelevant information to sentry
Queue, reporter and pid are not used or needed by anyone.
2021-03-31 14:49:29 +03:00
John Fragoulis 441ede529f A job might be an rspec example id
In which case the replacement method is wrong since it contains brackets.
This commit is a fix for 66f6f05.
2021-03-24 16:17:02 +02:00
John Fragoulis a71d25a99a Rename sentry key `job_path` to reflect the new value
Example of new value:
"bin/rspec --seed 1234 ./spec/foo_spec.rb:46"
2021-03-23 13:49:20 +02:00
John Fragoulis 66f6f058b6 Extract the filename from the rerun command
Example: "bin/rspec --seed 1234 ./spec/foo_spec.rb:46"
2021-03-23 13:47:46 +02:00
John Fragoulis de5c3626aa Update CHANGELOG for #58 2021-03-23 11:54:44 +02:00
John Fragoulis ec07267251 Bump version to 0.6.0 2021-03-23 11:54:26 +02:00
John Fragoulis d1a2369c4d Merge remote-tracking branch 'origin/test-reproduction' 2021-03-23 11:51:54 +02:00
John Fragoulis 9f6816e4f8 Display reproduction command for flakey tests
1. Expose the rspec seed.
2. Expose rspec example's location instead of the id.

Closes #32
Closes #45
2021-03-23 11:50:26 +02:00
John Fragoulis 0a8ea674fe Include seed to the reproduction command of failed examples
This will make life easier for the developers.
2021-03-23 11:47:58 +02:00
John Fragoulis 7168495afa Expose the rspec seed to the worker 2021-03-23 11:47:58 +02:00
John Fragoulis b6a46222c5 Add test for the reporter
Test that the output generated by the reporter contains the
expected failed examples, flaky tests etc and in the right format.
2021-03-22 09:32:14 +02:00
John Fragoulis efbf5dc899 Inform people how to setup redis 2021-03-22 09:12:42 +02:00