rockmelonqa / rockmelonqa-ide

Test Automation IDE that generates and runs Playwright and Selenium code
MIT License
4 stars 3 forks source link

Typescript: Save test result (to view later) and hide Run Test box #182

Closed quockhanh closed 1 year ago

quockhanh commented 1 year ago

Step to reproduce:

  1. Create new project with Typescript
  2. Add one or few test cases, which use Test Routine inside
  3. Gen code then run test

Actual: When the tests done, we see new browser tab which show test results and the run-tests dialog is still running (see image)

image

Expectation:

image

Problem 1: The run-test dialog should stop running, then turn to 'Done' mode (see attachment, as .NET project) Problem 2: test-runs/xxxx folder should contains following information:

  1. .code-metadata (BLUE highlight): should copy this file from output-code folder to this test-run/xxx folder. Because each test-run can base on different built-code. Keep this file here let us know the metadata of built-code relates to this run
  2. test-result.html file (GREEN highlight): Please save test result (what you see in browser tab) to a file, under this test-run/xxx. It may be a *.html file (we can change later), then ensure IDE can view this file via a component, like HtmlViewer (just example). Please ensure if user clicks View Result link at Run-Test dialog, then we open new IDE tab to show test result
  3. run-test.log file (RED highlight): If there is log for testing process, please write into this file - (See below problem 4)

IMPORTANT UPDATE: If you choose a test case which uses test routine, something wrong during test run process, which keeps run-test dialog still runing (problem 1), and application wont save files (problem 2). I think that is root cause (issue #181), please fix


Problem 3: After getting test-result.html file, we then see it in dark-mode (in Ubuntu environment, use HtmlViewer.svelte).

image

IMPORTANT UPDATE: Let's ignore this one now. The root cause is it bases on Ubuntu (OS) settings (see image). Inside playwright's test-result.html, there are built-in (generated) css for prefer-color-scheme, and it's used based on environment setting (dark or light theme). Forcing test-result.html display in light mode is not a great choice. Ideally, our app should follow OS theme setting

image


Problem 4: Research how to fix run-test.log to remove or display strange character

image

(Please check the teminal / console windows for raw text. Maybe should look at encode/decode?)

quockhanh commented 1 year ago

Should create multiple PR to fix separated/detailed issues Or we can split this ticket into small ones

brogreenmoon commented 1 year ago

Problem 1: done, tested successfully Problem 2: done, tested successfully Problem 3: ignored Problem 4: the display of run-test.log looks ok to me on my Windows 11 machine