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: