simbadltd / k6-junit Goto Github PK
View Code? Open in Web Editor NEWk6 JUnit summary exporter libray
License: MIT License
k6 JUnit summary exporter libray
License: MIT License
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"
}
}
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
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.