Skip to content

Commit 4fc2f53

Browse files
Merge pull request #38 from Shahnawaz-LambdaTest/master
changes for appending test names
2 parents d6333f0 + 818ecf9 commit 4fc2f53

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wdio-lambdatest-service",
3-
"version": "1.0.10",
3+
"version": "1.0.11",
44
"description": "A WebdriverIO service that manages tunnel and job metadata for LambdaTest.",
55
"author": "LambdaTest <[email protected]>",
66
"contributors": [

src/service.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default class LambdaRestService {
3535

3636
beforeScenario(world) {
3737
if (!this.suiteTitle){
38-
this.suiteTitle = world.pickle.name || 'unknown scenario'
38+
this.suiteTitle = world?.pickle?.name || 'unknown scenario'
3939
}
4040
}
4141

@@ -56,6 +56,12 @@ export default class LambdaRestService {
5656
}
5757
}
5858

59+
beforeStep(step) {
60+
if (!this.suiteTitle || this.suiteTitle == 'unknown scenario') {
61+
this.suiteTitle = step?.step?.scenario?.name || 'unknown scenario';
62+
}
63+
}
64+
5965
afterSuite(suite) {
6066
if (Object.prototype.hasOwnProperty.call(suite, 'error')) {
6167
++this.failures;

0 commit comments

Comments
 (0)