1

In working on reports, the karate-summary report appears to hold a lot more detail than just a summary. Before working to create our own method(s), I thought I would reach out here to see if it would be possible to consolidate existing info into the following report. This information is based on data that already exist in the various reports currently generated. Forgive the simple format.


 Feature file Name: Sample-GET-PUT.feature
 Feature description: Sample service domain tests
 Feature level tags: [@domain, @regression]
     scenarioCount: 5

     scenarioName: Toggle Sample/NetworkID/Hotspot
     scenarioTags: [@regression, @smoke]
     scenarioSteps: 29
         failedSteps: 0.0
         passedSteps: 29.0
         skippedSteps: 0.0
         scenarioStartTime: 1689965533039
         scenarioEndTime: 1689965544470
         scenarioDuration: 11431
Background excluded - 8 steps
Given path 'v1/network' ................................................... passed
When method GET ........................................................... passed
Then status 200 ........................................................... passed
* def scpNetworkId = get[0] $.networks[?(@.isScp  == true)].networkId ..... passed
* print 'scpNetworkId =', scpNetworkId .................................... passed
* if (!scpNetworkId || scpNetworkId.length==0) { karate.logger.debug('No SCP network found on account'); karate.abort(); } . passed
Given path 'v1/network/' + scpNetworkId + '/hotspot' ...................... passed
When method GET ........................................................... passed
Then status 200 ........................................................... passed
* def mode = $.mode ....................................................... passed
* if (mode == 'ENABLED') { karate.logger.debug('Hotspot status is ENABLED'); karate.abort(); } . passed
Given path 'v1/network/' + scpNetworkId + '/hotspot' ...................... passed
And request {mode: "ENABLE"} .............................................. passed
When method PUT ........................................................... passed
Then status 200 ........................................................... passed
* match $.mode == 'ENABLED' ............................................... passed
Given path 'v1/network/' + scpNetworkId + '/hotspot' ...................... passed
When method GET ........................................................... passed
Then status 200 ........................................................... passed
* match $.mode == 'ENABLED' ............................................... passed
Given path 'v1/network/' + scpNetworkId + '/hotspot' ...................... passed
And request {mode: "DISABLE"} ............................................. passed
When method PUT ........................................................... passed
Then status 200 ........................................................... passed
* match $.mode == 'DISABLED' .............................................. passed
Given path 'v1/network/' + scpNetworkId + '/hotspot' ...................... passed
When method GET ........................................................... passed
Then status 200 ........................................................... passed
* match $.mode == 'DISABLED' .............................................. passed

     scenarioName: Negative tests for Sample/networkID/Hotspot
     scenarioTags: [@regression, @domain]
     scenarioSteps: 21
         failedSteps: 1.0
         passedSteps: 20.0
         skippedSteps: 0.0
         scenarioStartTime: 1689965533056
         scenarioEndTime: 1689965542501
         scenarioDuration: 9445
Background excluded - 8 steps
Given def query = read('../../../payloads/getNetworkIdforDisabledSecurity.graphql') . passed
And def variables = { } ................................................... passed
And request { query: '#(query)' , variables: '#(variables)'} .............. passed
When method Post .......................................................... passed
Then status 200 ........................................................... passed
* match response.errors == '#notpresent' .................................. passed
* def firstNetworkId = get[0] $.data.allCustomerPremisesNetworks[?(@.isScp == true)].id . passed
* if (!firstNetworkId || firstNetworkId.length==0) { karate.logger.debug('Not an SCP network'); karate.abort(); } . passed
* def securityStatusInput = true .......................................... passed
Given def query = read('../../../payloads/updateNetworkSecurityStatus.graphql') . passed
And def variables = { var_networkSecurityToggleInput: { networkId : '#(firstNetworkId)', enabled : '#(securityStatusInput)' } } . passed
And request { query: '#(query)' , variables: '#(variables)'} .............. passed
When method POST .......................................................... passed
Then status 200 ........................................................... passed
* match each $.data.updateNetworkSecurity[*].enabled == securityStatusInput . passed
Given def query = read('../../../payloads/getNetworkIdforDisabledSecurity.graphql') . passed
And def variables = { forceCacheSkip: false } ............................. passed
And request { query: '#(query)' , variables: '#(variables)'} .............. passed
When method Post .......................................................... passed
Then status 200 ........................................................... passed
* match each $.data.allCustomerPremisesNetworks[*].security.status.enabled == true . failed

Stack Trace:
com.intuit.karate.KarateException: match failed: EACH_EQUALS
  $ | match each failed at index 0 (LIST:BOOLEAN)
  [false]
  true

    $[0] | not equal (BOOLEAN:BOOLEAN)
    false
    true

classpath:net/charter/network/test/api/graphql/NetworkSecurity-PUT.feature:74
    at <feature>.: * match each $.data.allCustomerPremisesNetworks[*].security.status.enabled == true (classpath:net/charter/network/test/api/graphql/NetworkSecurity-PUT.feature:74:74)
mike
  • 383
  • 1
  • 12
  • I am not able to understand this question at all. I suggest you write your own report, you can find instructions here: https://stackoverflow.com/a/66773839/143475 – Peter Thomas Jul 22 '23 at 04:07

0 Answers0