GithubHelp home page GithubHelp logo

k6-junit's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mmosallem mikocot

k6-junit's Issues

Module specifier "k6-junit" was tried to be loaded as remote module by prepending "https://" to it, which didn't work

I get this error:

WARN[0000] The moduleSpecifier "k6-junit" has no scheme but we will try to resolve it as remote module. This will be deprecated in the future and all remote modules will need to explicitly use "https" as scheme. 
ERRO[0000] Module specifier "k6-junit" was tried to be loaded as remote module by prepending "https://" to it, which didn't work. If you are trying to import a nodejs module, this is not supported as k6 is _not_ nodejs based. Please read https://k6.io/docs/using-k6/modules for more information. Remote resolution error: "Get "https://k6-junit": dial tcp: lookup k6-junit: no such host"
        at go.k6.io/k6/js.(*InitContext).Require-fm (native)
        at file:///Users/poponuts/Repositories/k6/k6.config.ts:5:0(22)
        at go.k6.io/k6/js.(*InitContext).Require-fm (native)
        at file:///Users/poponuts/Repositories/k6/support/authenticate.ts:3:0(37)
        at go.k6.io/k6/js.(*InitContext).Require-fm (native)
        at file:///Users/poponuts/Repositories/k6/test/user.api.ts:4:0(46)  hint="script exception"

My webpack.config.js has:

    externals: [
        function ({context, request}, c) {
            if (request.startsWith('k6') || request.startsWith('https://')) {
                return request === 'k6-junit' ? c() : c(null, 'commonjs ' + request);
            }
            return c();
        },
    ],

I created a kg.config.ts with the following:

import {jUnit} from "k6-junit";

export function handleSummary(data) {
    console.log('Preparing the end-of-test summary...');
    return {
        "./junit.xml": jUnit(data)
    };
}

Understandably, package.json has:

{
  "devDependencies": {
    "k6-junit": "X.X.X"
  }
}

please add to jslib - https://jslib.k6.io/

I use this module because our ci gitlab-ci supports junit so I can see via gitlabs restapi which tests that fails.
this module works excellent, but I need node installed to install it, which bloats up the container.

I know I can craft it so I do not need node, but then I loose the flexibility of versioning control and updating.
So it would be great if it can be added to https://jslib.k6.io/.

Thanks
MortenB

Support for nested checks

Hi, it looks like the current version doesn't support nested checks.

If tests are in form of

describe( .....
       describe(...... 
               describe(......
                       expect(........

only the outer case will be taken into account as a test suite, and since there are no checks directly in it, it will be ignored, generating empty file (with only the root test suite.

It's not trivial to add it, but it's also not super hard. Do you plan to do it?

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.