-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[test optimization] [SDTEST-1529] Add quarantined tests logic (#5236)
- Loading branch information
1 parent
b599fab
commit 366368a
Showing
36 changed files
with
1,408 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
integration-tests/ci-visibility/features-quarantine/quarantine.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Feature: Quarantine | ||
Scenario: Say quarantine | ||
When the greeter says quarantine | ||
Then I should have heard "quarantine" |
10 changes: 10 additions & 0 deletions
10
integration-tests/ci-visibility/features-quarantine/support/steps.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const assert = require('assert') | ||
const { When, Then } = require('@cucumber/cucumber') | ||
|
||
Then('I should have heard {string}', function (expectedResponse) { | ||
assert.equal(this.whatIHeard, 'fail') | ||
}) | ||
|
||
When('the greeter says quarantine', function () { | ||
this.whatIHeard = 'quarantine' | ||
}) |
13 changes: 13 additions & 0 deletions
13
integration-tests/ci-visibility/playwright-tests-quarantine/quarantine-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const { test, expect } = require('@playwright/test') | ||
|
||
test.beforeEach(async ({ page }) => { | ||
await page.goto(process.env.PW_BASE_URL) | ||
}) | ||
|
||
test.describe('quarantine', () => { | ||
test('should quarantine failed test', async ({ page }) => { | ||
await expect(page.locator('.hello-world')).toHaveText([ | ||
'Hello Warld' | ||
]) | ||
}) | ||
}) |
11 changes: 11 additions & 0 deletions
11
integration-tests/ci-visibility/quarantine/test-quarantine-1.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const { expect } = require('chai') | ||
|
||
describe('quarantine tests', () => { | ||
it('can quarantine a test', () => { | ||
expect(1 + 2).to.equal(4) | ||
}) | ||
|
||
it('can pass normally', () => { | ||
expect(1 + 2).to.equal(3) | ||
}) | ||
}) |
11 changes: 11 additions & 0 deletions
11
integration-tests/ci-visibility/quarantine/test-quarantine-2.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const { expect } = require('chai') | ||
|
||
describe('quarantine tests 2', () => { | ||
it('can quarantine a test', () => { | ||
expect(1 + 2).to.equal(3) | ||
}) | ||
|
||
it('can pass normally', () => { | ||
expect(1 + 2).to.equal(3) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
integration-tests/ci-visibility/vitest-tests/test-quarantine.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { describe, test, expect } from 'vitest' | ||
|
||
describe('quarantine tests', () => { | ||
test('can quarantine a test', () => { | ||
expect(1 + 2).to.equal(4) | ||
}) | ||
|
||
test('can pass normally', () => { | ||
expect(1 + 2).to.equal(3) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.