Fix newly identified issues to make our test suite more robust and faster
Originally created by @anonym on #10288 (Redmine)
Our initial plan will be to mark any scenario that we ever see fail in
the automated test suite run by jenkins (not locally, or anywhere
else) with the @fragile
tag. On jenkins we will run the test suite
with the Cucumber option --tag ~
fragile@, which makes it skip these
scenarios.
Whenever we find a robustness issue for a Scenario $SCENARIO
we do the
following:
- Add the @
fragile
tag to$SCENARIO
, commit it to a suitable base branchB
. OftenB
will bestable
, but it could bedevel
if not affectingstable
, or e.g.feature/jessie
(or other long-term integration branches) if only affecting that one. Let’s say this became commitDEADBEE
. Then mergeB
into all base branches where it makes sense (e.g. ifB
==stable
we’d merge intodevel
, and possible then mergedevel
intofeature/jessie
). - File a ticket (let’s say the number becomes #NNNNN) with subject:
“$SCENARIO is fragile” (or similar) and
- reference commit
DEADBEE
in the description. - make it block this ticket, i.e. #10288 (closed).
- reference commit
- Create a branch
test/NNNN-fix-${SCENARIO}
(or a similar, shortened name) fromB
, and- commit a revert of
DEADBEE
. - set this branch as the Feature Branch in ticket #NNNN.
- commit a revert of
Iterating this process (and merging the base branches into all feature/bugfix/test branches, including those created by this procedure) should make us converge to a state where we have isolated all robustness issues to individual branches, and all base branches should be green. On jenkins.
Note: There may be more than one reason to tag a scenario
@fragile
, which breaks the above scheme a bit. We do not want to end
up with the revert of one branch removing the @fragile
tag in the base
branches when its merged, while there still are at least one unmerged
branch with another reason for the scenario to be marked @fragile
. I
think the best way to track this is on the ticket, and by making a
comment around the @fragile
tag, listing each ticket tracking the
scenarios fragility. In each branch you remove only its ticket => we
get a merge conflict as a “notification” when merging, and we only
remove the tag in the base branch when the last ticket is removed from
the comment.
Creating a summary of failures
1. Clone the puppet-tails Git repo, get the attached json-analysis
script.
2. Get the `jobResults-*.xml` files you want from jenkins.lizard:/var/lib/jenkins/global-build-stats/jobresults/
3. download all the JSON test result files you’re interested in (you can pass an epoch to ISO-test-suite-runs, that’ll be the starting point) e.g.:
cd $PUPPET_TAILS_REPO
for url in $(./files/jenkins/master/ISO-test-suite-runs /tmp/jobResults-2015-12.xml) ; do
dest=$(mktemp --tmpdir=. tailstester-XXXXXXXXXX.json)
wget -O "$dest" "$url"
[ -s "$dest" ] || rm -f "$dest"
done
4. Do the analysis on JSON files:
json-analysis --steps *.json@
Attachments
Subtasks
-
#10375 (closed) -
#10376 (closed) -
#10379 (closed) -
#10380 (closed) -
#10378 (closed) -
#10381 (closed) -
#8961 (closed) -
#9654 (closed) -
#10440 (closed) -
#10441 (closed) -
#10442 (closed) -
#10444 (closed) -
#10474 (closed) -
#10475 -
#10493 (closed) -
#10495 (closed) -
#10496 (closed) -
#10497 (closed) -
#10498 (closed) -
#10499 (closed) -
#10500 (closed) -
#10501 (closed) -
#10502 (closed) -
#10503 (closed) -
#10504 (closed) -
#10523 (closed) -
#10718 (closed) -
#10774 (closed) -
#10775 (closed) -
#10776 (closed) -
#10777 (closed) -
#10783 (closed) -
#10900 (closed) -
#10991 (closed) -
#10992 (closed) -
#10994 (closed) -
#11114 (closed) -
#11394 (closed) -
#11398 (closed) -
#11400 (closed) -
#11401 (closed) -
#11409 (closed) -
#11413 (closed) -
#11414 (closed) -
#11452 (closed) -
#11453 (closed) -
#11457 (closed) -
#11458 (closed) -
#11462 (closed) -
#11463 (closed) -
#11464 (closed) -
#11465 (closed) -
#11479 (closed) -
#11508 (closed) -
#11521 (closed) -
#11558 (closed) -
#11563 (closed) -
#11582 (closed) -
#11583 (closed) -
#11584 (closed) -
#11585 (closed) -
sysadmin#11588 (closed) -
#11589 (closed) -
#11591 (closed) -
#11592 (closed) -
#11606 (closed) -
#11616 (closed) -
#11617 (closed) -
#11697 -
#11698 (closed) -
#11711 (closed) -
#11816 (closed) -
#11865 (closed) -
#11890 (closed) -
#11892 (closed) -
#11901 (closed) -
#11906 (closed) -
#12040 (closed) -
#12041 -
#12042 (closed) -
#12043 (closed) -
#12044 -
#12045 (closed) -
#12047 (closed) -
#12131 (closed) -
#12132 (closed) -
#12558 (closed) -
#12586 (closed) -
#13458 (closed) -
#13459 (closed) -
#13460 -
#13461 (closed) -
#13469 (closed) -
#13470 (closed) -
#13541 (closed) -
#14770 (closed) -
#14771 (closed) -
#15321 (closed) -
#15514 (closed)
Related issues
- Related to sysadmin#10287 (closed)
- Related to #10096 (closed)
- Related to #11355 (closed)
- Related to #16959 (closed)