0

I'm having 15 requests(test cases) in the executed collection. How can I calculate how many test cases got passed and failed in my 15 requests.

My Question in detail:

  • In the below mentioned result, as per my knowledge test scripts are considering as number of test cases executed. Assertions are the validating conditions.
  • 7 Test cases are reporting as the failure in the report. But if I went to assertion errors those are also the actual failures I.e even one assertion is failing in the test request, it should fail but those are not considering as test script failure.
  • How can I consider the fail count which is not considering the assertion failure? or any other way to calculate pass or fail count from this report.
  • Here is the command I'm using for newman report

    newman run Collection_Path -d URL_path --reporters cli,json –disable-Unicode;

My collection run report for your reference My collection run report for your reference

Ravi Makwana
  • 2,782
  • 1
  • 29
  • 41
  • With more context about how you have created those tests, it's difficult to know what those numbers mean. The script could fail without even having a test inside it so that's not really telling us the full picture – Danny Dainton Mar 06 '20 at 07:39
  • What is the final outcome that you would like to see? That information in a report? On the command line? – Danny Dainton Mar 06 '20 at 08:19
  • Hi @DannyDainton!!, I've created the collections which is sending request in json and will get the json response. – KrishnaChaitanya Vedantham Mar 06 '20 at 08:48
  • For example, Request Name : TestCase-1 Testscripts or validation script written in postman: 1. Testscript-1 2. Testscript-2 3. Testscript-3 – KrishnaChaitanya Vedantham Mar 06 '20 at 08:48
  • a)If all three test scripts are passed then the test case is pass.There is no issue here. b)If "Testscript-1" is pass but "Testscript-2" & "Testscript-3" is failed. Then the testcase should be fail. Here, that count is adding in assertion failure and not considering as testscipt failure. So, when i'm calculating the failure count it is differing. c) How can I come to conclusion for failure count after generating that report? – KrishnaChaitanya Vedantham Mar 06 '20 at 08:49
  • Could you update the question with an example of your test code. The pm.test assertions and the test script failures are not the same thing, are you sure that the tests fail for the reason you mention in the assertion and not due to say, a value you're referencing not being there. – Danny Dainton Mar 06 '20 at 11:12
  • I would recommend opening a topic on the community.postman.com site, this will allow you to explain the issue in better detail. – Danny Dainton Mar 06 '20 at 11:13

0 Answers0