Coder Social home page Coder Social logo

playwright-junit-reporter's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

iv3x konboi

playwright-junit-reporter's Issues

Cannot find module '@babel/code-frame'

Hello! In advance, thanks for opening this project!

I followed the instructions, passed the options in my config file, but when executing the tests, it runs immediately into:

Require stack:
- C:\playwright\node_modules\@xray-app\playwright-junit-reporter\dist\base.js
- C:\playwright\node_modules\@xray-app\playwright-junit-reporter\dist\index.js
- C:\playwright\node_modules\@playwright\test\lib\common\transform.js
- C:\playwright\node_modules\@playwright\test\lib\common\testType.js
- C:\playwright\node_modules\@playwright\test\lib\common\test.js
- C:\playwright\node_modules\@playwright\test\lib\reporters\multiplexer.js
- C:\playwright\node_modules\@playwright\test\lib\runner\reporters.js
- C:\playwright\node_modules\@playwright\test\lib\runner\runner.js
- C:\playwright\node_modules\@playwright\test\lib\cli.js
- C:\playwright\node_modules\playwright-core\lib\cli\cli.js
- C:\playwright\node_modules\playwright-core\cli.js
- C:\playwright\node_modules\@playwright\test\cli.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1021:15)
    at Function.resolveFilename (C:\playwright\node_modules\@playwright\test\lib\common\transform.js:173:36)
    at Function.Module._load (node:internal/modules/cjs/loader:866:27)
    at Module.require (node:internal/modules/cjs/loader:1093:19)
    at require (node:internal/modules/cjs/helpers:108:18)
    at Object.<anonymous> (C:\playwright\node_modules\@xray-app\playwright-junit-reporter\dist\base.js:26:22)
    at Module._compile (node:internal/modules/cjs/loader:1191:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1245:10)
    at Object.i.<computed>.ot._extensions.<computed> (C:\playwright\node_modules\@playwright\test\lib\utilsBundleImpl.js:16:1010)
    at Module.load (node:internal/modules/cjs/loader:1069:32)
    at Function.Module._load (node:internal/modules/cjs/loader:904:12)
    at Module.require (node:internal/modules/cjs/loader:1093:19)
    at require (node:internal/modules/cjs/helpers:108:18)
    at Object.<anonymous> (C:\playwright\node_modules\@xray-app\playwright-junit-reporter\dist\index.js:24:16)
    at Module._compile (node:internal/modules/cjs/loader:1191:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1245:10)
    at Object.i.<computed>.ot._extensions.<computed> (C:\playwright\node_modules\@playwright\test\lib\utilsBundleImpl.js:16:1010)
    at Module.load (node:internal/modules/cjs/loader:1069:32)
    at Function.Module._load (node:internal/modules/cjs/loader:904:12)
    at Module.require (node:internal/modules/cjs/loader:1093:19)
    at require (node:internal/modules/cjs/helpers:108:18)
    at requireOrImport (C:\playwright\node_modules\@playwright\test\lib\common\transform.js:154:20)
    at requireOrImportDefaultFunction (C:\playwright\node_modules\@playwright\test\lib\runner\loadUtils.js:243:51)
    at loadReporter (C:\playwright\node_modules\@playwright\test\lib\runner\loadUtils.js:252:10)
    at createReporter (C:\playwright\node_modules\@playwright\test\lib\runner\reporters.js:63:71)
    at Runner.runAllTests (C:\playwright\node_modules\@playwright\test\lib\runner\runner.js:64:58)
    at runTests (C:\playwright\node_modules\@playwright\test\lib\cli.js:135:151)
    at ji.<anonymous> (C:\playwright\node_modules\@playwright\test\lib\cli.js:48:7) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\playwright\\node_modules\\@xray-app\\playwright-junit-reporter\\dist\\base.js',
    'C:\\playwright\\node_modules\\@xray-app\\playwright-junit-reporter\\dist\\index.js',
    'C:\\playwright\\node_modules\\@playwright\\test\\lib\\common\\transform.js',
    'C:\\playwright\\node_modules\\@playwright\\test\\lib\\common\\testType.js',
    'C:\\playwright\\node_modules\\@playwright\\test\\lib\\common\\test.js',
    'C:\\playwright\\node_modules\\@playwright\\test\\lib\\reporters\\multiplexer.js',
    'C:\\playwright\\node_modules\\@playwright\\test\\lib\\runner\\reporters.js',
    'C:\\playwright\\node_modules\\@playwright\\test\\lib\\runner\\runner.js',
    'C:\\playwright\\node_modules\\@playwright\\test\\lib\\cli.js',
    'C:\\playwright\\node_modules\\playwright-core\\lib\\cli\\cli.js',
    'C:\\playwright\\node_modules\\playwright-core\\cli.js',
    'C:\\playwright\\node_modules\\@playwright\\test\\cli.js'
  ]
}```

Possible Report inconsistencies when using beforeEach

Hello!
I know, this proejct is in its early phase, but it would be nice if you will have a look on the following issue:

When using a beforeEach like this:

test.describe("foo", () => {
  test.beforeEach(async ({ page }) => {
    await test.step("Do this first", async () => {
       //I let test already fail here...
    });
  });


  test("And then do this", async ({
    page,
  }, testInfo) => {
    testInfo.annotations.push({ type: "test_key", description: "Ticket-xxx" });
     // ... so that this part will not be executed.
});

Then no test_key property will be provided in the report.

My current workaround is as follows:

test.describe("foo", () => {
    test.beforeEach(async ({ page }, testInfo) => {
    testInfo.annotations.push({
      type: "test_key",
      description: "TICKET-PLACEHOLDER",
    });
    await test.step("Do this first", async () => {
        //I let test already fail here...
    });
  });

and then use a script to edit the report retroactively, so:

...
<properties>
<property name="test_key" value="Ticket-xxx">
</property>
<property name="test_key" value="Ticket-xxx">
</property>
<property name="testrun_evidence">
</property>
</properties>
...

Not nice, but sufficient.

Maybe there is a programmatic solution that could be provided by you?

Report inconsistencies when using beforeAll and >1 workers

When using beforeAll like this with more than one worker:

test.beforeAll(async ({ page }, testInfo) => {
    testInfo.annotations.push({ type: "test_key", description: "Ticket-foo" });
    ...
});
test("An amazing test", async ({
    page,
  }, testInfo) => {
    testInfo.annotations.push({ type: "test_key", description: "Ticket-bar" });
   ...
});

the report will look like this:

...
<properties>
<property name="test_key" value="Ticket-foo">
</property>
<property name="test_key" value="Ticket-bar">
</properties>
...

what will lead to inconsistencies in xray when importing the results. My only solution is: Just use 1 worker :-D

Is there a programmatic solution provided by you possible?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.