[GitHub] metron issue #1226: METRON-1803: Integrate Cypress with Travis
Github user mmiklavc commented on the issue: https://github.com/apache/metron/pull/1226 For some reason the Travis check shows as still in progress on my end even though it shows as passed when I click details. I'm still +1 on this. Thanks @tiborm. ---
[GitHub] metron issue #1226: METRON-1803: Integrate Cypress with Travis
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1226 @mmiklavc I had to roll back that last improvement. For some reason, some tests are failing with mocked time but just on Travis. I wasn't able to figure out why. ---
[GitHub] metron issue #1226: METRON-1803: Integrate Cypress with Travis
Github user mmiklavc commented on the issue: https://github.com/apache/metron/pull/1226 Excellent addition, though it looks like this change broke your tests. ---
[GitHub] metron issue #1226: METRON-1803: Integrate Cypress with Travis
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1226 You are right @mmiklavc, this is an additional step to our build process. So it makes our build slightly slower. However, the two minutes come from the nature of PCAP. It has a built-in 10-second delay every time we check the job status. What makes these particular tests slower. With mocking out the time I was able to speed them up by 50%. I think it's also a good practice for the upcoming tests to keep them fast with this trick. ---
[GitHub] metron issue #1226: METRON-1803: Integrate Cypress with Travis
Github user mmiklavc commented on the issue: https://github.com/apache/metron/pull/1226 I think I'm good on this @tiborm. I also ran the tests locally and everything passed as expected. I did notice that this adds 2 minutes to the metron-alerts build - I expect that is because this change is completely additive and is not replacing any Protractor tests at this time. Nice work, thanks for the contribution. +1 ---
[GitHub] metron issue #1226: METRON-1803: Integrate Cypress with Travis
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1226 @mmiklavc @justinleet I created a ticket to track the migration of protractor tests to cypress. https://issues.apache.org/jira/browse/METRON-1848 All the existing tests are collected and listed for migration. As part of the migration, my plan is to keep E2E nature of the existing tests. This means I will ensure the tests are able to run against an actual service if available. Otherwise, the runner turns the mocks responses on. ---
[GitHub] metron issue #1226: METRON-1803: Integrate Cypress with Travis
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1226 @mmiklavc Yes, that's the main file. Cypress.conf.json contains 4 line of configs and package.json 3 lines of changes required by the integration. Anything else is test response data. ---
[GitHub] metron issue #1226: METRON-1803: Integrate Cypress with Travis
Github user mmiklavc commented on the issue: https://github.com/apache/metron/pull/1226 @tiborm - Taking another pass at this, am I correct that this is the meat of this change? https://github.com/apache/metron/blob/6a2a643efb34466137958ca208646276e8698ddf/metron-interface/metron-alerts/cypress/integration/pcap/pcap.spec.js. This is the test file. Everything else summing up to the current 19k lines is either changes to package files in npm or test requests/response data. ---
[GitHub] metron issue #1226: METRON-1803: Integrate Cypress with Travis
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1226 I just made some more improvement on this: - I was able to remove one big fixture file - removed unused support and plugin files (also found configs to prevent cypress to regenerate them) ---
[GitHub] metron issue #1226: METRON-1803: Integrate Cypress with Travis
Github user mmiklavc commented on the issue: https://github.com/apache/metron/pull/1226 @nickwallen is this what you're looking for? I have some questions about what I'm looking at here. Are the checkmarks only indicating that a test has run, not that it has passed? I'm assuming the numbered item indicates it is the test that has failed. So if `requesting job status` also failed, I imagine it would also add `2) requesting job status`? ``` [INFO] â¹ ï½¢wdmï½£: Compiled successfully. [INFO] ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ [INFO] [INFO] Running: pcap/pcap.spec.js... (1 of 1) [INFO] [INFO] [INFO] PCAP Tab [INFO] [INFO] 1) checking running jobs on navigating to PCAP tab [INFO] [INFO] â checking running jobs on navigating to PCAP tab (3822ms) [INFO] [INFO] â submitting PCAP job request (4689ms) [INFO] [INFO] â requesting job status (6310ms) [INFO] [INFO] â process status in percentage (7122ms) [INFO] [INFO] â getting pcap json (7203ms) [INFO] [INFO] â rendering pcap table (8214ms) [INFO] [INFO] â showing pcap details (7887ms) [INFO] [INFO] â navigating accross pages (7209ms) [INFO] [INFO] â downloading pdml (7402ms) [INFO] [INFO] â cancelling (kill) pcap query job (7101ms) [INFO] [INFO] â showing filter validation messages (4208ms) [INFO] [INFO] â showing date validation messages (3419ms) [INFO] [INFO] [INFO] 12 passing (1m) [INFO] 1 failing [INFO] [INFO] 1) PCAP Tab checking running jobs on navigating to PCAP tab: [INFO] CypressError: Timed out retrying: expected 'http://localhost:4200/api/v1/pcap?state=RUNNING' to include '?state=HAPPY-HOLYDAY' [INFO] at Object.cypressErr (http://localhost:4200/__cypress/runner/cypress_runner.js:68040:11) [INFO] at Object.throwErr (http://localhost:4200/__cypress/runner/cypress_runner.js:68005:18) [INFO] at Object.throwErrByPath (http://localhost:4200/__cypress/runner/cypress_runner.js:68032:17) [INFO] at retry (http://localhost:4200/__cypress/runner/cypress_runner.js:61785:16) [INFO] at http://localhost:4200/__cypress/runner/cypress_runner.js:53903:18 [INFO] at tryCatcher (http://localhost:4200/__cypress/runner/cypress_runner.js:7091:23) [INFO] at Promise._settlePromiseFromHandler (http://localhost:4200/__cypress/runner/cypress_runner.js:5113:31) [INFO] at Promise._settlePromise (http://localhost:4200/__cypress/runner/cypress_runner.js:5170:18) [INFO] at Promise._settlePromise0 (http://localhost:4200/__cypress/runner/cypress_runner.js:5215:10) [INFO] at Promise._settlePromises (http://localhost:4200/__cypress/runner/cypress_runner.js:5290:18) [INFO] at Async._drainQueue (http://localhost:4200/__cypress/runner/cypress_runner.js:2023:16) [INFO] at Async._drainQueues (http://localhost:4200/__cypress/runner/cypress_runner.js:2033:10) [INFO] at Async.drainQueues (http://localhost:4200/__cypress/runner/cypress_runner.js:1907:14) [INFO] at [INFO] [INFO] [INFO] [INFO] [INFO] (Results) [INFO] [INFO] ââââââââââââââââââââââââââââââââââââââ [INFO] â Tests:13 â [INFO] â Passing: 12 â [INFO] â Failing: 1â [INFO] â Pending: 0â [INFO] â Skipped: 0â [INFO] â Screenshots: 1â [INFO] â Video:falseâ [INFO] â Duration: 1 minute, 27 seconds â [INFO] â Spec Ran: pcap/pcap.spec.jsâ [INFO] ââââââââââââââââââââââââââââââââââââââ [INFO] [INFO] [INFO] (Screenshots) [INFO] [INFO] - /home/travis/build/tiborm/metron/metron-interface/metron-alerts/cypress/screenshots/pcap/pcap.spec.js/PCAP Tab -- checking running jobs on navigating to PCAP tab (failed).png (1280x720) [INFO] [INFO] 7 [INFO] [INFO] (Run Finished) 7[INFO]
[GitHub] metron issue #1226: METRON-1803: Integrate Cypress with Travis
Github user nickwallen commented on the issue: https://github.com/apache/metron/pull/1226 Thanks for pointing out what it looks-like when a build fails. The Travis output does not seem to indicate which test failed and why. Did I miss it? How are we going to know why it failed? ``` [ERROR] npm ERR! errno 1 [ERROR] npm ERR! metron-alerts@0.6.0 cypress:run: `cypress run` [ERROR] npm ERR! Exit status 1 [ERROR] npm ERR! [ERROR] npm ERR! Failed at the metron-alerts@0.6.0 cypress:run script. [ERROR] npm ERR! This is probably not a problem with npm. There is likely additional logging output above. [ERROR] [ERROR] npm ERR! A complete log of this run can be found in: [ERROR] npm ERR! /home/travis/.npm/_logs/2018-10-04T12_14_48_510Z-debug.log [ERROR] ERROR: "cypress:run" exited with 1. [ERROR] npm ERR! code ELIFECYCLE [ERROR] npm ERR! errno 1 [ERROR] npm ERR! metron-alerts@0.6.0 cypress:ci: `run-p --race start cypress:run` [ERROR] npm ERR! Exit status 1 [ERROR] npm ERR! [ERROR] npm ERR! Failed at the metron-alerts@0.6.0 cypress:ci script. [ERROR] npm ERR! This is probably not a problem with npm. There is likely additional logging output above. [ERROR] [ERROR] npm ERR! A complete log of this run can be found in: [ERROR] npm ERR! /home/travis/.npm/_logs/2018-10-04T12_14_48_594Z-debug.log [ERROR] npm ERR! code ELIFECYCLE [ERROR] npm ERR! errno 1 [ERROR] npm ERR! metron-alerts@0.6.0 testCI: `ng test --watch=false --browsers=ChromeHeadless && npm run cypress:ci` [ERROR] npm ERR! Exit status 1 [ERROR] npm ERR! [ERROR] npm ERR! Failed at the metron-alerts@0.6.0 testCI script. [ERROR] npm ERR! This is probably not a problem with npm. There is likely additional logging output above. [ERROR] [ERROR] npm ERR! A complete log of this run can be found in: [ERROR] npm ERR! /home/travis/.npm/_logs/2018-10-04T12_14_48_607Z-debug.log [INFO] [?25h [INFO] [INFO] Reactor Summary: [INFO] [INFO] metron-config .. SUCCESS [03:59 min] [INFO] metron-alerts .. FAILURE [05:50 min] [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 09:50 min [INFO] Finished at: 2018-10-04T12:14:48+00:00 [INFO] Final Memory: 26M/268M [INFO] [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:npm (npm testCI) on project metron-alerts: Failed to run task: 'npm run testCI' failed. (error code 1) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :metron-alerts ``` ---