# Status Calculation

### Status

<table><thead><tr><th>Status</th><th width="126">Denoted</th><th>What's it</th></tr></thead><tbody><tr><td>PASSED</td><td><mark style="color:green;background-color:green;">PASSED</mark></td><td>It's to mention that it worked successfully as it was meant to</td></tr><tr><td>FAILED</td><td><mark style="color:red;background-color:red;">FAILED</mark></td><td>it's not working fine as expected. An error will be attached to this case.</td></tr><tr><td>SKIPPED</td><td><mark style="background-color:yellow;">SKIPPED</mark></td><td>it's to mention that it got skipped as it was intended to.  Reason would be mentioned for this case.</td></tr><tr><td>XFAILED</td><td><mark style="color:orange;background-color:orange;">XFAILED</mark></td><td>it failed but it was expected</td></tr><tr><td>XPASSED</td><td><mark style="background-color:blue;">XPASSED</mark></td><td>it was supposed to fail but got passed</td></tr></tbody></table>

### Data Stored

***

<table><thead><tr><th>Suite Type</th><th>Reference Values</th><th width="161">Table &#x26; Col Name</th><th>Possible Values</th></tr></thead><tbody><tr><td>Assertion</td><td>User Given</td><td>AssertBase, "Passed"</td><td>Passed - True / False</td></tr><tr><td>Test Case</td><td>User Given</td><td>SuiteBase, "standing"</td><td>PASSED/FAILED/SKIPPED/XFAILED/XPASSED</td></tr><tr><td>Test Suite</td><td>Calculated</td><td>SuiteBase, "standing"</td><td>PASSED/FAILED/SKIPPED/XFAILED/XPASSED</td></tr></tbody></table>

### Calculation of the Status of the Test Suite

***

we call a Test Entity to be a Test Suite since it would have collection test cases under it or another collection (Test Suite), which why with reference to the Test Status of the test cases we calculate the status of the Test Suite

We Do the following to find the status of the Test Suite:

<table><thead><tr><th width="233">Status of the Test Cases</th><th>Status of the Test Suite</th><th>Explanation</th></tr></thead><tbody><tr><td>PASSED, FAILED, XPASSED, ....</td><td>FAILED</td><td>Since one of the test cases under it failed</td></tr><tr><td>PASSED, PASSED, ...</td><td>PASSED</td><td>Since all the test cases were passed</td></tr><tr><td>FAILED, SKIPPED, PASSED...</td><td>FAILED</td><td>Since one of the test cases under it failed</td></tr><tr><td>SKIPPED, SKIPPED</td><td>SKIPPED</td><td>Since all the test cases were skipped</td></tr><tr><td>PASSED, SKIPPED</td><td>PASSED</td><td>Since none of them failed and  at least one of them have passed</td></tr><tr><td>XPASSED, PASSED</td><td>XPASSED</td><td>Since none of them failed and one of them was XPASSED</td></tr><tr><td>XFAILED, SKIPPED</td><td>XFAILED</td><td>Since none of them failed and passed and one of them was XFAILED</td></tr></tbody></table>

### Calculation of the Status of the Test Run

***

Same logic is applied to find the status of the test run here it is based on the statuses of the Test Suites.
