reportportal/client-dotnet

TestItemResponse doesn't have information about retries

Closed this issue · 5 comments

The TestItemResponse class has IsRetry property which is mapped to retry property in JSON:

[JsonPropertyName("retry")]
public bool IsRetry { get; set; }

Bun server-side TestItemResponse class doesn't have the retry property and returns collection of retries in the retries field:

@JsonProperty(value = "retries")
private List<TestItemResource> retries;

Expected result:
TestItemResponse in client-net library has the property Retries of type IEnumerable<TestItemResponse>

Actual:
TestItemResponse in client-net library doesn't have a property Retries, property IsRetry is always false.

For reference:

GET item response
{
  "id": 2097,
  "uuid": "0f424587-2720-4b70-881f-3be63460c502",
  "name": "first test",
  "codeRef": "com.epam.ta.reportportal.demodata.first test",
  "description": "Clear all created and not deleted during test *userFilter*, *widget* and *dashboard* objects.",
  "parameters": [
    
  ],
  "attributes": [
    {
      "key": null,
      "value": "longest"
    },
    {
      "key": null,
      "value": "most failed"
    },
    {
      "key": null,
      "value": "most stable"
    }
  ],
  "type": "STEP",
  "startTime": 1682072456328,
  "endTime": 1682072456365,
  "status": "FAILED",
  "statistics": {
    "executions": {
      "total": 1,
      "failed": 1
    },
    "defects": {
      "product_bug": {
        "total": 1,
        "pb001": 1
      }
    }
  },
  "parent": 2093,
  "pathNames": {
    "launchPathName": {
      "name": "Demo Api Tests",
      "number": 1247
    },
    "itemPaths": [
      {
        "id": 2092,
        "name": "Suite with retries"
      },
      {
        "id": 2093,
        "name": "First test case"
      }
    ]
  },
  "issue": {
    "issueType": "pb001",
    "autoAnalyzed": false,
    "ignoreAnalyzer": false,
    "externalSystemIssues": [
      
    ]
  },
  "hasChildren": false,
  "hasStats": true,
  "launchId": 136,
  "uniqueId": "auto:038dffd3f1540ae2032e3b6f48d6de66",
  "testCaseId": "com.epam.ta.reportportal.demodata.first test",
  "testCaseHash": -1610792692,
  "patternTemplates": [
    
  ],
  "retries": [
    {
      "id": 2094,
      "uuid": "4aa45ff3-5b5c-41ed-9608-f3ae582c0fc1",
      "name": "first test",
      "codeRef": "com.epam.ta.reportportal.demodata.first test",
      "description": "Clear all created and not deleted during test *userFilter*, *widget* and *dashboard* objects.",
      "parameters": [
        
      ],
      "attributes": [
        
      ],
      "type": "STEP",
      "startTime": 1682072456052,
      "endTime": 1682072456160,
      "status": "FAILED",
      "statistics": {
        "executions": {
          
        },
        "defects": {
          
        }
      },
      "parent": 2093,
      "hasChildren": false,
      "hasStats": true,
      "uniqueId": "auto:038dffd3f1540ae2032e3b6f48d6de66",
      "testCaseId": "com.epam.ta.reportportal.demodata.first test",
      "testCaseHash": -1610792692,
      "patternTemplates": [
        
      ],
      "path": "2092.2093.2097.2094"
    },
    {
      "id": 2095,
      "uuid": "745d7a82-643e-42fc-ac03-890f58ca5a0b",
      "name": "first test",
      "codeRef": "com.epam.ta.reportportal.demodata.first test",
      "description": "Greater or equals filter test for test items product bugs criteria. Negative value",
      "parameters": [
        
      ],
      "attributes": [
        
      ],
      "type": "STEP",
      "startTime": 1682072456179,
      "endTime": 1682072456258,
      "status": "FAILED",
      "statistics": {
        "executions": {
          
        },
        "defects": {
          
        }
      },
      "parent": 2093,
      "hasChildren": false,
      "hasStats": true,
      "uniqueId": "auto:038dffd3f1540ae2032e3b6f48d6de66",
      "testCaseId": "com.epam.ta.reportportal.demodata.first test",
      "testCaseHash": -1610792692,
      "patternTemplates": [
        
      ],
      "path": "2092.2093.2097.2095"
    },
    {
      "id": 2096,
      "uuid": "a0aaf260-a9a7-4112-816d-0016a60e5d33",
      "name": "first test",
      "codeRef": "com.epam.ta.reportportal.demodata.first test",
      "description": "This is the last **test case** of demo launch. There are only `logs` with `attachments` inside it.",
      "parameters": [
        
      ],
      "attributes": [
        
      ],
      "type": "STEP",
      "startTime": 1682072456277,
      "endTime": 1682072456314,
      "status": "FAILED",
      "statistics": {
        "executions": {
          
        },
        "defects": {
          
        }
      },
      "parent": 2093,
      "hasChildren": false,
      "hasStats": true,
      "uniqueId": "auto:038dffd3f1540ae2032e3b6f48d6de66",
      "testCaseId": "com.epam.ta.reportportal.demodata.first test",
      "testCaseHash": -1610792692,
      "patternTemplates": [
        
      ],
      "path": "2092.2093.2097.2096"
    }
  ],
  "path": "2092.2093.2097"
}

@pantosha I've created a PR with fix. Could you please let us know how critical this bug for you?

@Aleh-Yanushkevich I would consume fix earlier than later. It has high priority for us.

@nvborisenko seems, that we have to create a new release.

@Aleh-Yanushkevich @pantosha released as 3.3.1, thanks for collaboration.