Project

General

Profile

Actions

action #134690

closed

coordination #121855: [epic] Agama web interactive installation

Enable logs upload for agama playwright tests

Added by syrianidou_sofia 8 months ago. Updated 7 months ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
Start date:
2023-08-28
Due date:
% Done:

100%

Estimated time:

Description

After unifying the agama playwright tests, we cannot use hardcoded log name paths in order to upload trace.zip logs. We can add a command that will find and move the trace.zip file to a specifically named folder, se that we can upload it using the same command for all tests.

Previously we used:
upload_logs('./test-results/lvm-The-main-page-Use-logical-volume-management-LVM-as-storage-device-for-installation-chromium/trace.zip');

Now we would like to rename first and then use generic file path:
assert_script_run('find ./test-results -name 'trace.zip' -exec mv -t /tmp/ {} +');
upload_logs('./tmp/trace.zip');

Additionally, investigate the possibility of playwright creating more than one log file and make sure that all files will be uploaded.


Related issues 1 (0 open1 closed)

Related to qe-yam - action #132989: Unify interactive installations in tests/yam/agama and its respective schedulesResolvedtinawang1232023-08-28

Actions
Actions #1

Updated by JERiveraMoya 8 months ago

  • Priority changed from Normal to High
Actions #2

Updated by syrianidou_sofia 8 months ago

  • Description updated (diff)
Actions #3

Updated by JERiveraMoya 8 months ago

  • Parent task deleted (#132989)
Actions #4

Updated by JERiveraMoya 8 months ago

  • Related to action #132989: Unify interactive installations in tests/yam/agama and its respective schedules added
Actions #5

Updated by JERiveraMoya 8 months ago

  • Parent task set to #121855
Actions #6

Updated by lmanfredi 8 months ago

  • Status changed from Workable to In Progress
  • Assignee set to lmanfredi
Actions #7

Updated by lmanfredi 8 months ago

After doing some local tests, it seems that Playwright will create a zip file for each test always with the name trace.zip but inside separated folders.
The name of these folders are build by using:

  • the name of ts file without the suffix .spec.ts
  • the title of the test with spaces replaced with hyphens and special chars removed
  • the name of project (chromium in our case)

E.g. a file test-3.spec.ts with the content:

import { test, expect } from '@playwright/test';

test.describe('The main page', () => {

  test.beforeEach(async ({ page }) => {
    await ...
  });

  test('has title', async ({ page }) => {
    ...
  });

  test('get started: /home Link', async ({ page }) => {
    ...
  });

  test('API link', async ({ page }) => {
    ...
    await test.step("inside step", async () => {
      ...
    });

  });

});

by running the test with playwright test --project chromium --trace on tests/test-3.spec.ts
will be created these files:

./test-results/test-3-The-main-page-has-title-chromium/trace.zip
./test-results/test-3-The-main-page-API-link-chromium/trace.zip
./test-results/test-3-The-main-page-get-started-home-Link-chromium/trace.zip
Actions #8

Updated by lmanfredi 8 months ago

Created PR#17674

Actions #9

Updated by lmanfredi 8 months ago

  • % Done changed from 0 to 90
Actions #10

Updated by lmanfredi 8 months ago

Merged PR#17674

Actions #11

Updated by lmanfredi 8 months ago

  • % Done changed from 90 to 100
Actions #12

Updated by lmanfredi 7 months ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF