Skip to content

Commit 31770f1

Browse files
committed
fixes pt.3
1 parent 9bee418 commit 31770f1

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

bin/testObservability/helper/helper.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -748,15 +748,15 @@ exports.isTestObservabilitySupportedCypressVersion = (cypress_config_filename) =
748748
exports.setTestObservabilityFlags = (bsConfig) => {
749749
/* testObservability */
750750
let isTestObservabilitySession = true;
751-
if(!utils.isUndefined(bsConfig["testObservability"])) isTestObservabilitySession = ( bsConfig["testObservability"] == true );
752-
if(!utils.isUndefined(process.env.BROWSERSTACK_TEST_OBSERVABILITY)) isTestObservabilitySession = ( process.env.BROWSERSTACK_TEST_OBSERVABILITY == "true" );
751+
if(!utils.isUndefined(bsConfig["testObservability"])) isTestObservabilitySession = ( bsConfig["testObservability"] == true || bsConfig["testObservability"] == 1 );
752+
if(!utils.isUndefined(process.env.BROWSERSTACK_TEST_OBSERVABILITY)) isTestObservabilitySession = ( process.env.BROWSERSTACK_TEST_OBSERVABILITY == "true" || process.env.BROWSERSTACK_TEST_OBSERVABILITY == "1" );
753753
if(process.argv.includes('--disable-test-observability')) isTestObservabilitySession = false;
754754
isTestObservabilitySession = isTestObservabilitySession && this.isTestObservabilitySupportedCypressVersion(bsConfig.run_settings.cypress_config_file);
755755

756756
/* browserstackAutomation */
757757
let isBrowserstackInfra = true;
758-
if(!utils.isUndefined(bsConfig["browserstackAutomation"])) isBrowserstackInfra = ( bsConfig["browserstackAutomation"] == true );
759-
if(!utils.isUndefined(process.env.BROWSERSTACK_AUTOMATION)) isBrowserstackInfra = ( process.env.BROWSERSTACK_AUTOMATION == "true" );
758+
if(!utils.isUndefined(bsConfig["browserstackAutomation"])) isBrowserstackInfra = ( bsConfig["browserstackAutomation"] == true || bsConfig["browserstackAutomation"] == 1 );
759+
if(!utils.isUndefined(process.env.BROWSERSTACK_AUTOMATION)) isBrowserstackInfra = ( process.env.BROWSERSTACK_AUTOMATION == "true" || process.env.BROWSERSTACK_AUTOMATION == "1" );
760760
if(process.argv.includes('--disable-browserstack-automation')) isBrowserstackInfra = false;
761761

762762
process.env.BROWSERSTACK_TEST_OBSERVABILITY = isTestObservabilitySession;

bin/testObservability/reporter/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,13 @@ class MyReporter {
234234
test_run_uuid : step.test_run_uuid,
235235
hook_run_uuid : step.hook_run_uuid,
236236
timestamp: step.started_at,
237+
duration: step.duration,
237238
level: step.result,
238239
message: step.text,
239-
kind: 'TEST_LOG',
240+
failure: step.failure,
241+
failure_reason: step.failure_reason,
242+
failure_type: step.failure_type,
243+
kind: 'TEST_STEP',
240244
http_response: {}
241245
};
242246
allStepsAsLogs.push(currentStepAsLog);

0 commit comments

Comments
 (0)