Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a new public servlet: Execution Data (by tag) #2204

Closed
Nouxx opened this issue Nov 4, 2020 · 4 comments
Closed

Create a new public servlet: Execution Data (by tag) #2204

Nouxx opened this issue Nov 4, 2020 · 4 comments
Assignees

Comments

@Nouxx
Copy link
Contributor

Nouxx commented Nov 4, 2020

As dicussed together (@vertigo17 @MorganLmd), here is my proposal:

{
    "messageType": "OK",
    "message": "Tag Statistics - Read was finished with success!",
    "tagDuration": 65,
    "tag": "Cerberus.20201104-035911",
    "nbExe": 245,
    "nbOK": 238,
    "nbKO": 0,
    "nbFA": 0,
    "nbNA": 0,
    "nbPE": 0,
    "nbCA": 0,
    "nbQU": 0,
    "nbWE": 0,
    "nbNE": 0,
    "nbQE": 0,
    "ciResult": "OK",
    "dateCreated": "Nov 4, 2020 3:59:11 AM",
    "dateEndQueue": "Nov 4, 2020 5:05:02 AM",
    "executions": [
        {
            "priority": 1,
            "priorityARA":"sanity-check",
            "shortDesc": "As a Cerberus Admin, I can read the User list",
            "comment": "",
            "testCaseStatus": "WORKING",
            "manualExecution": false,
            "test": "GUI : Administration",
            "testcase": "0001A",
            "environment": "QA",
            "environmentARA": "eupp5",
            "country": "FR",
            "countryARA": "France",
            "start": 1604458757000,
            "end": 1604458776000,
            "executionId": "274231",
            "executionLink": "https://prod.cerberus-testing.org/TestCaseExecution.jsp?executionId=274231",
            "executionStatus": "OK",
            "executionMessage": "The test case finished successfully",
            "stacktrace": "Failed to click because could not find element 'xpath=//*[contains(lower-case(@content-desc),"connexion")]'!",
        }
    ]
}

pattern selection for priorityARA, environmentARA and countryARA

Such invariants must have an attribute prefixed by ara-, this attribute value will be selected and returned in these fields.

Example:
image

If none or more than one is defined, it should return null

@vertigo17
Copy link
Member

1/
Not very keen in putting ARA references in the code. This should be for me more generic in order to allow more flexibility integrating to any other tool.
What about changing from

{
  "priority": 1,
  "priorityARA":"sanity-check",
}

to

{
  "priority": {
    "value": 1,
    "gp1" : "sanity-check",
    "gp2" : "toto"
  }
}

or

{
  "priority": 1,
  "priority-gp1":"sanity-check",
}

Then you can agree on which attribute to use and map the data accordingly.
Same for environment and countries.

Also, stacktrace does not exist.
Cerberus report an executionStatus and executionMessage. stacktrace in fact will be inside the executionMessage

Also executionId --> id

Maybe we will also have to review some names to fit the last format used for testcase (for ex, I don't think we should put prefix to execution as this is all execution).
Then we would add the unit on duration

{
    "messageType": "OK",
    "message": "Tag Statistics - Read was finished with success!",
    "tagDurationInS": 65,
    "tag": "Cerberus.20201104-035911",
    "nbExe": 245,
    "nbOK": 238,
    "nbKO": 0,
    "nbFA": 0,
    "nbNA": 0,
    "nbPE": 0,
    "nbCA": 0,
    "nbQU": 0,
    "nbWE": 0,
    "nbNE": 0,
    "nbQE": 0,
    "ciResult": "OK",
    "dateCreated": "Nov 4, 2020 3:59:11 AM",
    "dateEndQueue": "Nov 4, 2020 5:05:02 AM",
    "executions": [
        {
            "priority": 1,
            "priority-gp1":"sanity-check",
            "testcaseDescription": "As a Cerberus Admin, I can read the User list",
            "testcaseComment": "",
            "testcaseStatus": "WORKING",
            "manualExecution": false,
            "test": "GUI : Administration",
            "testcase": "0001A",
            "environment": "QA",
            "environment-gp1": "eupp5",
            "country": "FR",
            "country-gp1": "France",
            "start": 1604458757000,
            "end": 1604458776000,
            "id": "274231",
            "link": "https://prod.cerberus-testing.org/TestCaseExecution.jsp?executionId=274231",
            "status": "OK",
            "message": "The test case finished successfully - Failed to click because could not find element 'xpath=//*[contains(lower-case(@content-desc),"connexion")]'!",
            "system": "US-vertigo17",
            "application": "MyWebSite",
            "robot": "MyRobot",
            "robotDecli": "F65"
        }
    ]
}

Let's me know what you think about it.

@Nouxx
Copy link
Contributor Author

Nouxx commented Nov 16, 2020

Hey,

Ok to pass full invariants objects for countries, priorities and environment, but with attributes instead of gp to align with the front

Is it possible to get the stacktrace from the executionMessage?
Stacktrace will be much more relevant since the execution message is redundant with the status (OK -> this testcase finished sucessfully, FA -> The test case failed to be executed because of an action...). It might need a separate ticket?

Ok for id instead of executionId, my bad (:

Ok for unit on duration for tag and execution

Which ends up with:

{
    "messageType": "OK",
    "message": "Tag Statistics - Read was finished with success!",
    "tagDurationInSeconds": 65,
    "tag": "Cerberus.20201104-035911",
    "nbExe": 245,
    "nbOK": 238,
    "nbKO": 0,
    "nbFA": 0,
    "nbNA": 0,
    "nbPE": 0,
    "nbCA": 0,
    "nbQU": 0,
    "nbWE": 0,
    "nbNE": 0,
    "nbQE": 0,
    "ciResult": "OK",
    "dateCreated": "Nov 4, 2020 3:59:11 AM",
    "dateEndQueue": "Nov 4, 2020 5:05:02 AM",
    "executions": [
        {
            "priority": {
                "value": 1,
                "attribute1": "sanity-check",
                "attribute2": "toto"
            },
            "country": {
                "value": "FR",
                "attribute1": "fr-FR",
                "attribute2": "France"
            },
            "environment": {
                "value": "PREPROD",
                "attribute1": "eupp5"
            },
            "testcaseDescription": "As a Cerberus Admin, I can read the User list",
            "testcaseComment": "",
            "testcaseStatus": "WORKING",
            "manualExecution": false,
            "test": "GUI : Administration",
            "testcase": "0001A",
            "start": 1604458757000,
            "end": 1604458776000,
            "durationInSeconds": 19000,
            "id": "274231",
            "link": "https://prod.cerberus-testing.org/TestCaseExecution.jsp?executionId=274231",
            "status": "OK",
            "message": "The test case finished successfully",
            "detailedMessage":"Failed to click because could not find element 'xpath=//*[contains(lower-case(@content-desc),"connexion")]'!"
            "system": "US-vertigo17",
            "application": "MyWebSite",
            "robot": "MyRobot",
            "robotDecli": "F65"
        }
    ]
}

Note that in V1 detailedMessage will be the same content as message

@Nouxx Nouxx self-assigned this Mar 3, 2021
Nouxx added a commit that referenced this issue Apr 2, 2021
#2204, might need a slight code cleanliness check before closing the issue
@vertigo17
Copy link
Member

I created a new Version of the servlet respecting more the Cerberus standard + adding a bit more data.
It is V002 and available in QA. Can you have a look ?

@vertigo17
Copy link
Member

I close the issue as part of 4.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants