[FOLIO-1807] Stripes/UI module unit tests not executed in CI Created: 14/Feb/19 Updated: 03/Jun/20 Resolved: 14/Feb/19 |
|
| Status: | Closed |
| Project: | FOLIO |
| Components: | None |
| Affects versions: | None |
| Fix versions: | None |
| Type: | Bug | Priority: | P2 |
| Reporter: | John Malconian | Assignee: | John Malconian |
| Resolution: | Done | Votes: | 0 |
| Labels: | ci, sprint57 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original estimate: | Not Specified | ||
| Issue links: |
|
||||||||
| Sprint: | |||||||||
| Development Team: | Core: Platform | ||||||||
| Description |
|
It appears that frontend modules with unit tests are not executing correctly in CI. Jenkins console log: + xvfb-run '--server-args=-screen 0 1024x768x24' yarn test --karma.singleRun --karma.browsers ChromeDocker --karma.reporters mocha junit --coverage yarn run v1.9.4 $ stripes test karma --karma.singleRun --karma.browsers ChromeDocker --karma.reporters mocha junit --coverage Done in 0.78s. [Pipeline] echo All tests completed successfully. There is no test output displayed in the log and the execution time is way to small (.78s) which leads me to believe the tests are not executed at all and a status of '0' is returned. |
| Comments |
| Comment by John Malconian [ 14/Feb/19 ] |
|
| Comment by John Malconian [ 14/Feb/19 ] |
|
I notice in the last couple of days stripes-cli version has changed from @folio/stripes-cli@1.9.1000166 to @folio/stripes-cli@1.9.1000170. Wondering if some change in stripes-cli behavior is affecting this. When I run the tests manually in the CI build env, they run fine. |
| Comment by John Malconian [ 14/Feb/19 ] |
|
Verified that when pinning stripes-cli to @folio/stripes-cli@1.9.1000166, the tests are executed in CI. |
| Comment by John Malconian [ 14/Feb/19 ] |
|
Tests are invoked in CI by invoking a virtual frame buffer (needed in order to run in Docker). xvfb-run '--server-args=-screen 0 1024x768x24' yarn test --karma.singleRun --karma.browsers ChromeDocker --karma.reporters mocha junit --coverage Running this command manually in CI build environment does execute the tests, but when this invoked in Jenkins with stripes-cli 1.9.1000170, it doesn't appear anything is invoked. |
| Comment by John Malconian [ 14/Feb/19 ] |
|
The exact version of stripes-cli where behavior has changed is @folio/stripes-cli@1.9.1000168. |
| Comment by John Malconian [ 14/Feb/19 ] |
|
Matthew Jones has implemented a fix in stripes-cli and released to master. Issue is resolved in https://github.com/folio-org/stripes-cli/pull/173. The issue was caused by changes in stripes-cli related to stdin handling, and, in particular, cases where a tty is not present (ala Jenkins). For posterity purposes, it's worth noting that wrapping a command that requires a tty in a 'script' command is a viable woprkaround to bypass this limitation. Example: script --return -c 'xvfb-run --server-args="-screen 0 1024x768x24" yarn test --karma.singleRun --karma.browsers ChromeDocker --karma.reporters mocha junit --coverage' /dev/null |