Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions .github/workflows/testomatio

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/testomatio.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# used for Testomatio CI functionality testing

name: testomatio-ci-test

on:
workflow_dispatch:
inputs:
grep:
description: 'tests to grep'
required: false
default: ''
run:
required: false
default: ''
testomatio:
required: false
default: ''

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22

- run: npm ci

- run: npx playwright install --with-deps

- run: npx playwright test --grep "${{ github.event.inputs.grep }}"
env:
TESTOMATIO: "${{ github.event.inputs.testomatio }}"
TESTOMATIO_RUN: "${{ github.event.inputs.run }}"
7 changes: 7 additions & 0 deletions ci-test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules/
test-results/
playwright-report/
.env
/test-results/
/playwright-report/
/playwright/.cache/
15 changes: 15 additions & 0 deletions ci-test/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "Playwright tests with TESTOMATIO",
"version": "1.1.1",
"description": "Running and Monitoring Playwright tests with TESTOMATIO Reporter and Bitbucket Pipeline",
"main": "index.js",
"scripts": {
"test": "npx playwright test"
},
"license": "ISC",
"dependencies": {
"@playwright/test": "^1.46.1",
"@testomatio/reporter": "^2.6.0",
"dotenv": "^16.4.5"
}
}
34 changes: 34 additions & 0 deletions ci-test/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { PlaywrightTestConfig, devices } from '@playwright/test';
import 'dotenv/config'

// Reference: https://playwright.dev/docs/test-configuration
const config: PlaywrightTestConfig = {
timeout: 300 * 1000,
retries: process.env.CI ? 0 : 0,
fullyParallel: true,
reporter: [
['list'],
['json'],
['@testomatio/reporter/playwright', {
apiKey: process.env.TESTOMATIO,
}]
],

use: {
trace: 'retain-on-failure',
contextOptions: {
ignoreHTTPSErrors: true,
},

screenshot: 'on',
},
projects: [
{
name: 'Desktop Chrome',
use: {
...devices['Desktop Chrome'],
},
},
]
};
export default config;
28 changes: 28 additions & 0 deletions ci-test/tests/shard.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { test, expect } from '@playwright/test'

test.describe("Suite 1 @Sff5e0016", () => {
test('Test 1 (10 seconds) @Tbd91a4a2', async () => {
console.log('Test 1 (10 seconds) started: ' + new Date().toLocaleString());
// await new Promise(resolve => setTimeout(resolve, 10_000));
expect(1 + 1).toBe(2)
console.log('Test 1 (10 seconds) finished: ' + new Date().toLocaleString());
});
test('Test 2 (110 seconds) @Tec827edd', async () => {
console.log('Test 2 (110 seconds) started: ' + new Date().toLocaleString());
// await new Promise(resolve => setTimeout(resolve, 110_000));
expect(1 + 1).toBe(2)
console.log('Test 2 (110 seconds) finished: ' + new Date().toLocaleString());
});
test('Test 3 (120 seconds) @T0cbac05e', async () => {
console.log('Test 3 (120 seconds) started: ' + new Date().toLocaleString());
// await new Promise(resolve => setTimeout(resolve, 120_000));
expect(1 + 1).toBe(2)
console.log('Test 3 (120 seconds) finished: ' + new Date().toLocaleString());
});
test('Test 4 (150 seconds) @T96632266', async () => {
console.log('Test 4 (150 seconds) started: ' + new Date().toLocaleString());
// await new Promise(resolve => setTimeout(resolve, 150_000));
expect(1 + 1).toBe(2)
console.log('Test 4 (150 seconds) finished: ' + new Date().toLocaleString());
});
});