[ 
https://issues.apache.org/jira/browse/METRON-1803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16645272#comment-16645272
 ] 

ASF GitHub Bot commented on METRON-1803:
----------------------------------------

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 <anonymous>
    [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] 
    [INFO]       Spec                                                Tests  
Passing  Failing  Pending  Skipped 
    [INFO]   
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
    [INFO]   │ ✖ pcap/pcap.spec.js                         01:27       13       
12        1        -        - │
    [INFO]   
└────────────────────────────────────────────────────────────────────────────────────────────────┘
    [INFO]     1 of 1 failed (100%)                        01:27       13       
12        1        -        -  
    [INFO] 
     3 6 6 1 1 4 4 6npm ERR! code ELIFECYCLE
    ```


> Integrate Cypress with Travis
> -----------------------------
>
>                 Key: METRON-1803
>                 URL: https://issues.apache.org/jira/browse/METRON-1803
>             Project: Metron
>          Issue Type: Improvement
>            Reporter: Tibor Meller
>            Assignee: Tibor Meller
>            Priority: Major
>
> [DISCUSS] thread on the dev mailing list:
> [https://lists.apache.org/thread.html/b6a0272c7809c05e8b7aff20171720e8ec76f8a0e9481169c37a4a4a@%3Cdev.metron.apache.org%3E]
> JIRA Ticket: https://issues.apache.org/jira/browse/METRON-1803
> This PR adds Cypress.io to our project. It makes us able to run E2E tests, UI 
> integration tests. Also higher level UI tests with mocked services.
> As part of this PR I added tests to cover the following functionalities of 
> PCAP UI panel:
>  * checking running jobs on navigating to PCAP tab
>  * submitting PCAP job request
>  * requesting job status
>  * process status in percentage
>  * getting PCAP JSON
>  * rendering PCAP table
>  * showing PCAP details
>  * navigating across pages
>  * downloading PDML
>  * cancelli PCAP query job
>  * showing filter validation messages
>  * showing date validation messages
> Please consider while reviewing that these tests are not meant to cover all 
> the details of the functionalities above. The aim here is to extend the test 
> coverage build up by a large number of Unit Tests with higher level UI tests.
> h3. New folders
> Cypress files sit in cypress folder. Some of them might look like an empty 
> placeholder but cypress actively uses all files in this PR.
> h4. Integration folder
> That contains the actual Cypress tests. The folder name comes from the 
> Cypress naming convention, however, no real integration tests implemented 
> here yet (at least no other than the integration of UI components to a whole 
> application). We could change the name of the folder anytime we like to, but 
> only one folder applicable.
> h4. Fixture folder
> The tests are running on mocked data. This makes us able to integrate them 
> with Travis without the need to having PCAP related services available from 
> our CI.
> Each file in the Fixture folder represents a response to a particular 
> request. This makes it fairly easy to create and maintain.
> h3. How to run tests on your local machine
> To run Cypress tests locally please do the following:
>  # pull this branch to your workspace
>  # move to metron-interface/metron-alerts folder
>  # run: npm ci
>  # run: scripts/start-server-for-e2e.sh
>  # run: node_modules/cypress/bin/cypress run
> or run: node_modules/cypress/bin/cypress open
> if you like to use the dashboard.
> h3. Travis integration
> As part of this PR I modified the package.json in metron-alert to make 
> Cypress running in Travis. If you like to see the integration working please 
> check to logs of build step [#3|https://github.com/apache/metron/pull/3].
> Failing Cypress tests brakes the build.
> Example of build broken by failing Cypress test:
> [https://travis-ci.com/tiborm/metron/builds/86869264]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to