Upload Test to Katalon TestOps via Jest.


This is a companion discussion topic for the original entry at https://docs.katalon.com/katalon-analytics/docs/kt-upload-test-jest.html

I have just tried this for Jest and he does appear to work. As with your screenshots of the uploaded results appearing in TestOps, mine also display as ‘No name’ on the test runs page. Do you know this can be uploaded with a meaningful name? Probably some configuration in the VS Code project somewhere…any help appreciated.

Hi @AndyG72,

You can specify the name by using describe block of Jest.
For more information, check out our sample project for Jest https://github.com/katalon-studio-samples/testops-report-sample-js/tree/master/jest.

1 Like

Hi @anhqle, thanks for replying.

I know we can set a name for the actual test being executed in the describe part of the test and that does work fine for me.

Where I see ‘No name’ in TestOps is on where it should be displaying a ‘Suite name’. See attached screenshot - If I inspect the files uploaded, the suites.json contains name":“No name”, so that is what is being shown here. That is what I don’t know how to change…

If the test is not in any describe block, it would have “No name” as suite name.
I suggest you move your tests to inside a describe block.

describe("Suite name", () => {
  it("Test name", () => {
    
  });
});
1 Like

@anhqle Thank you. You were of course correct the first time. I forgot I had moved my simple tests yesterday so that they actually weren’t in a describe block, just as you suspected.

All working now. Thank you very much :slight_smile: