kobenguyent / codeceptjs-rphelper

4 stars 23 forks source link

Half of the test cases in a test suite in RP is displaying no results #33

Open mtrejo-evgo opened 6 months ago

mtrejo-evgo commented 6 months ago
Save log with tempId abcd {
  promiseStart: Promise {
    {
      id: 'REDACTED',
      uniqueId: 'REDACTED'
    }
  },
  realId: 'REDACTED',
  children: [ 'abce' ],
  finishSend: false,
  promiseFinish: Promise { <pending> },
  resolveFinish: [Function (anonymous)],
  rejectFinish: [Function (anonymous)]
Finish test item with tempId abcd { endTime: 1715989367638, status: 'failed' }
kobenguyent commented 6 months ago

Hey, is it possible if could provide the screenshot? Ofc, censoring your sensitive information.

mtrejo-evgo commented 6 months ago
Screenshot 2024-05-20 at 9 42 00 AM
kobenguyent commented 6 months ago

Hmm, strange! Did you run with codeceptjs run or run-workers?

mtrejo-evgo commented 6 months ago

yarn test --grep

mtrejo-evgo commented 6 months ago

I think yarn test runs "codeceptjs run --verbose"

kobenguyent commented 6 months ago

Supposedly, the codeceptjs run or codeceptjs run-workers should give us the same results. May I know if there is any reason that prevents you from using run-workers? I'm asking because the issue happens with run command would be in lower priority as mostly, I think, we would essentially use run-workers to execute tests in the real world scenarios and run command is useful to debug a specific test, for instance.

mtrejo-evgo commented 6 months ago

Hey @kobenguyent, I've run it with run-workers now, I'm seeing the same results.

kobenguyent commented 6 months ago

Hey @mtrejo-evgo would be nice if you could provide a minimal repo where I could reproduce the issue.

mtrejo-evgo commented 6 months ago

@kobenguyent, we don't have a way of providing a sample of our repo without exposing our private info.

mtrejo-evgo commented 6 months ago

is there anything explicit that we could share?

kobenguyent commented 6 months ago

Ah, is it possible that you could add DEBUG= before the command like DEBUG= codeceptjs run --verbose. That would give us more information. Hopefully you could see any errors from the console logs.

mtrejo-evgo commented 6 months ago

Here's the results

From running codeceptjs:


 follow-redirects options {
  maxRedirects: 21,
  maxBodyLength: 10485760,
  protocol: 'https:',
  path: '/api/v1/project/item/abcd’,
  method: 'PUT',
  headers: {
    Accept: 'application/json, text/plain, */*',
    'Content-Type': 'application/json',
    'User-Agent': 'NodeJS',
    Authorization: 'bearer REDACTED’,
    'Content-Length': 95
  },
  agent: undefined,
  agents: { http: undefined, https: undefined },
  auth: undefined,
  hostname: 'saas.reportportal.io',
  port: null,
  nativeProtocols: {
    'http:': {
      _connectionListener: [Function: connectionListener],
      METHODS: [Array],
      STATUS_CODES: [Object],
      Agent: [Function],
      ClientRequest: [Function: ClientRequest],
      IncomingMessage: [Function: IncomingMessage],
      OutgoingMessage: [Function: OutgoingMessage],
      Server: [Function: Server],
      ServerResponse: [Function: ServerResponse],
      createServer: [Function: createServer],
      validateHeaderName: [Function: __node_internal_],
      validateHeaderValue: [Function: __node_internal_],
      get: [Function: get],
      request: [Function: request],
      setMaxIdleHTTPParsers: [Function: setMaxIdleHTTPParsers],
      maxHeaderSize: [Getter],
      globalAgent: [Getter/Setter]
    },
    'https:': {
      Agent: [Function: Agent],
      globalAgent: [Agent],
      Server: [Function: Server],
      createServer: [Function: createServer],
      get: [Function: get],
      request: [Function: request]
    }
  }
} +6ms

From report portal:



{
    "id": 1234,
    "uuid": “abcd”,
    "name": “Create customer”,
    "codeRef": "",
    "parameters": [],
    "attributes": [],
    "type": "SUITE",
    "startTime": 1717004294038,
    "endTime": 1717004294039,
    "status": "FAILED",
    "statistics": {
        "executions": {},
        "defects": {
            "to_investigate": {
                "total": 1,
                "ti001": 1
            }
        }
    },
    "pathNames": {
        "launchPathName": {
            "name": "stg-testing",
            "number": 1
        }
    },
    "issue": {
        "issueType": "ti001",
        "autoAnalyzed": false,
        "ignoreAnalyzer": false,
        "externalSystemIssues": []
    },
    "hasChildren": false,
    "hasStats": true,
    "launchId": 0987654,
    "uniqueId": "a:1asdf2”,
    "testCaseId": "",
    "testCaseHash": 0,
    "patternTemplates": [],
    "path": “97665554”
}
mtrejo-evgo commented 5 months ago

Hey @kobenguyent , do you still need anything from our side?

kobenguyent commented 5 months ago

@mtrejo-evgo would be nice to have a sample repo where I could replicate the issue. I'm still puzzled as I could not trace any issue with my test repo.

mtrejo-evgo commented 5 months ago

@kobenguyent could we schedule a call with you sometime to share the repo so you can see the issue?

kobenguyent commented 5 months ago

@mtrejo-evgo sure. That'll be great!

mtrejo-evgo commented 5 months ago

I'll reach out on slack to try to schedule

kobenguyent commented 4 months ago

after the debug session, we found the issue is that when test failed at hooks. No results are logging into RP.