-
Task
-
Resolution: Fixed
-
Critical
-
None
-
Powered by SuggestiMate -
Blue Ocean - 1.1-beta-1, Blue Ocean - 1.1-beta2, Blue Ocean 1.1-beta4
- relates to
-
JENKINS-43083 Improve unit and integration tests and avoid relying on E2E (ATH) for front end code
-
- Resolved
-
-
JENKINS-43740 Improve test coverage of blueocean-events
-
- Resolved
-
[JENKINS-43671] Identify where java unit test coverage is poor
jamesdumay Following are the current coverage, looks like lot more work needed to reach 90%. I have opened PR to generate test report, currently I am not failing build if criteria is not met. After all modules meet the criteria we can enable failing on build if coverage is not met. See PR https://github.com/jenkinsci/blueocean-plugin/pull/1013.
Current code coverages for each module and corresponding ticket.
- blueocean-commons 25%
JENKINS-43924 - blueocean-config 0%
JENKINS-43917 - blueocean-events 0%
JENKINS-43740 - blueocean-git-pipeline 58%
JENKINS-43923 - blueocean-github-pipeline 0%
JENKINS-43741 - blueocean-i18n 37%
JENKINS-43921 - blueocean-jwt 47%
JENKINS-43919 - blueocean-pipeline-api-impl 58%
JENKINS-43916 - blueocean-rest-impl 65%
JENKINS-43914 - blueocean-web 11%
JENKINS-43920
Completing the coverage analysis with the ATH analysis:
ATH
Area | Subareas | Automated tests | Notes | Issues found during ET? |
---|---|---|---|---|
Creating new pipelines | With github | |||
With git | https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/creation/git/localRepo.js - SKIPPED | Creates a pipeline with git, checks that creation finishes successfully and finally checks the activity tab |
|
|
Editing/workflow with declarative pipelines | Visual editor (convert) | See the table below for coverage on this plugin | ||
Edition | ||||
Interacting with running builds, capturing input, starting/stopping builds | Queued state | https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/queued.js - SKIPPED |
|
|
Failing stages and rerunning | https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/failingStages.js |
|
||
Failing pipeline | https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/failing.js |
|
||
not Multibranch | freestyleRunning - https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/notMultibranch/freestyleRunning.js pipelineRunning - https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/notMultibranch/pipelineRunning.js |
|
||
multibranch | commit messages - https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/multibranch/commitMessages.js |
|
||
filtering - https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/multibranch/filtering.js |
|
|||
Folders - https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/multibranch/folder.js |
|
|||
Run and open for multibranch - https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/multibranch/multibranchOpening.js |
|
|||
Test results - https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/multibranch/testResults.js |
|
|||
Using blue ocean to navigate a set of pipelines/jobs (perhaps pre existing) |
||||
Artefact | https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/artifacts/artifacts.js |
|
||
authorCollapsed | https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/edgeCases/authorCollapsed.js - SKIPPED |
|
All the tests skipped | |
folders | https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/edgeCases/folder.js - Some know as failing in CI |
|
||
deepLinks | https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/edgeCases/runDetailsDeepLink.js |
|
||
initialStage | https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/edgeCases/initialStage.js |
|
||
freestyle | https://github.com/jenkinsci/blueocean-acceptance-test/tree/master/src/test/js/freestyle |
|
||
i18n | https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/i18n/loadGerman.js |
|
||
smoke | https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/smoke.js |
|
||
matrix | https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/matrix.js |
|
||
404 pages | https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/404.js |
|
||
Logs | Freestyle - https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/log-karaoke/freestyle.js |
|
||
Freestyle ping - https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/log-karaoke/freestylePing.js |
|
|||
Input - https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/log-karaoke/input.js |
|
|||
pipeline with no stages but with steps - https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/log-karaoke/noStages.js |
|
|||
parallel stages - https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/log-karaoke/parallelStages.js |
|
|||
parametrised Pipeline - https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/log-karaoke/parametrisedPipeline.js |
|
|||
stages block - https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/log-karaoke/stages-block.js and stages new - https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/log-karaoke/stages-new.js and stages old - https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/js/log-karaoke/stages-old.js |
|
Adding comprehensive information about the unit/integration tests at plugins level (we already have %, but this is more about functionality) both for blue ocean and the pipeline editor:
Blue ocean plugin
Pipeline editor plugin
Area | Subarea | Automated tests | Notes |
---|---|---|---|
Metadata | https://github.com/jenkinsci/blueocean-pipeline-editor-plugin/blob/master/src/test/java/io/blueocean/rest/pipeline/editor/PipelineMetadataServiceTest.java | Unit test for checking metadata | |
PipelineSyntaxConverter | https://github.com/jenkinsci/blueocean-pipeline-editor-plugin/blob/master/src/test/js/services/PipelineSyntaxConverter-spec.js |
|
vilacides There is separate ATH ticket for that. In this ticket, backend functionality is tested by writing backend integration tests and unit test to test each individual functionality in backend code, code coverage is going to be measure for that.
vivek I would like you to go through all our java modules and identify where we could improve test coverage. We should have tickets in your queue for improving that coverage so that we do not rely on the ATH to pick up problems. For example, creation backend has almost no tests and I would expect the coverage for that to be rather high.
I expect that we want to set a minimum coverage (90%?) for each of our modules and have the build fail if we go below that amount.
imeredith is working from this document to improve the ATH situation for logged in scenarios such as creation, editing and personalization.