karma-runner / karma-sauce-launcher

A Karma plugin. Launch any browser on SauceLabs!
MIT License
199 stars 103 forks source link

No test names are being set, `undefined` instead #241

Closed christian-bromann closed 3 years ago

christian-bromann commented 3 years ago

It seems like with the latest version of Sauce Launcher all results are being transmitted as undefined, see https://app.saucelabs.com/tests/62eaaf74c9244092b878a6d71074992f

wswebcreation commented 3 years ago

@christian-bromann ? Is this with the current demo that is provided or is this with one of the last versions of Karma

christian-bromann commented 3 years ago

Must be with one of the last versions. I discovered the error looking at MochaJS jobs and they have defined this package as "karma-sauce-launcher": "^4.3.4", in their package.json which I assume downloads the latest version.

wswebcreation commented 3 years ago

This might be related to the karma version they are using, the issue doesn't happen when I look at the current tests in this project

wswebcreation commented 3 years ago

I'll see if I can figure this one out in the coming days

taymoork2 commented 3 years ago

I created a patch for my setup --> https://github.com/webex/webex-js-sdk/pull/2032 I'm using karma v6 and mocha v8 so I'm unsure if the package version is the actual issue

// node_modules/karma-sauce-launcher/dist/reporter/reporter.js

-        const status = result.success ? '✅' : '❌';
+        const status = result.success ? '✅' : result.skipped ? '➖' : '❌';
         browserData.results.push({
             status: 'info',
-            message: `${status} ${result.fullName}`,
+            message: `${status} ${result.fullName || result.description}`,
christian-bromann commented 3 years ago

@taymoork2 would you mind creating a PR?

taymoork2 commented 3 years ago

@christian-bromann can do FYI my patch also changes a console.info to a console.debug since it ends up spamming the console for me, unsure if you'd like me to add this change as well

- log.info(`Check if 'log.json' for browser '${browserName}' has already been stored.`);
+ log.debug(`Check if 'log.json' for browser '${browserName}' has already been stored.`);
karmarunnerbot commented 3 years ago

:tada: This issue has been resolved in version 4.3.6 :tada:

The release is available on:

Your semantic-release bot :package::rocket: