Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RATEST-349: Run 2.x E2E tests on chrome and firefox via github actions #485

Merged
merged 8 commits into from
May 29, 2023

Conversation

anjula-sack
Copy link
Collaborator

@anjula-sack anjula-sack commented May 23, 2023

Requirements

  • This PR has a title that briefly describes the work done, including the ticket number if there is a ticket.
  • I have tested the changes locally and verified that they work as intended.
  • I have added comments to my code where necessary to help others understand my changes.
  • I have read and agree to the Contributing Guidelines of this project.

Summary

For a while RefApp 2.x e2e tests have been running on the Firefox browser in GitHub actions. In this PR the all the tests are being updated to run on chrome as well. This was achieved by updating the github actions workflows.

Screenshots

None.

Related Issue

https://issues.openmrs.org/browse/RATEST-349

Other

None.

@anjula-sack anjula-sack force-pushed the RATEST-349 branch 2 times, most recently from da20e3d to 420ba31 Compare May 24, 2023 01:11
@anjula-sack anjula-sack changed the title RATEST-349 RATEST-349: Run 2.x E2E tests on chrome May 24, 2023
@anjula-sack anjula-sack force-pushed the RATEST-349 branch 6 times, most recently from f8dc2ea to be01851 Compare May 24, 2023 07:55
@anjula-sack anjula-sack force-pushed the RATEST-349 branch 2 times, most recently from 3f42eb0 to ba90cf8 Compare May 25, 2023 03:34
@anjula-sack anjula-sack marked this pull request as ready for review May 25, 2023 07:47
@anjula-sack anjula-sack requested a review from kdaud May 25, 2023 07:48
@kdaud
Copy link
Member

kdaud commented May 25, 2023

Thanks @anjula-sack for pulling this up. Could you help me understand how this work?

@anjula-sack
Copy link
Collaborator Author

anjula-sack commented May 25, 2023

Thanks @anjula-sack for pulling this up. Could you help me understand how this work?

The strategy section defines a matrix strategy that allows the job to run multiple times with different configurations. In this case, the matrix specifies a variable browser with two possible values: firefox and chrome. This means that the job will run twice, once with browser set to firefox and once with browser set to chrome.

image

@kdaud
Copy link
Member

kdaud commented May 25, 2023

The strategy looks great!

Does this configuration overrides the global setting here?

@anjula-sack
Copy link
Collaborator Author

The strategy looks great!

Does this configuration overrides the global setting here?

No, It just downloads the chrome selenuim driver and runs the tests. Basically everything is same as before we just have extra jobs to run tests on chrome

@kdaud
Copy link
Member

kdaud commented May 25, 2023

So which browser is being used by the tests as per this commit?

@anjula-sack
Copy link
Collaborator Author

So which browser is being used by the tests as per this commit?

Both of them. Check the tests, you can see every test has been ran twice. One with chrome and the other with firefox.

@kdaud
Copy link
Member

kdaud commented May 25, 2023

Have skimmed through the logs and noticed all the two jobs are running on firefox browser.

https://github.com/openmrs/openmrs-contrib-qaframework/actions/runs/5076943535/jobs/9119634346?pr=485#step:7:11615

https://github.com/openmrs/openmrs-contrib-qaframework/actions/runs/5076943535/jobs/9119634430?pr=485#step:7:11636

Could you take a look at the logs to find out why this is happening so? What would happen when you switch browser order and begin with chrome?.

strategy:
      matrix:
        browser:
          - chrome
          - -firefox`

Copy link
Collaborator

@Piumal1999 Piumal1999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job @anjula-sack . I added some comments

.github/workflows/qa.yml Outdated Show resolved Hide resolved
.github/workflows/refapp-2x-find-Patient.yml Outdated Show resolved Hide resolved
.github/workflows/refapp-2x-form.yml Outdated Show resolved Hide resolved
@anjula-sack
Copy link
Collaborator Author

@kdaud Check now. It's running on both now. I had to update the properties.

@kdaud kdaud changed the title RATEST-349: Run 2.x E2E tests on chrome RATEST-349: Run 2.x E2E tests on chrome and firefox via github actions May 29, 2023
Copy link
Member

@kdaud kdaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!
Thanks @anjula-sack

@kdaud kdaud merged commit f7e1722 into openmrs:master May 29, 2023
@kdaud
Copy link
Member

kdaud commented May 29, 2023

@anjula-sack, revert the changes that were made in the platform ui tests.

@anjula-sack
Copy link
Collaborator Author

@anjula-sack, revert the changes that were made in the platform ui tests.

Didn't get you?

@kdaud
Copy link
Member

kdaud commented May 29, 2023

The platform ui tests should be excluded from the changes and that's why they're failing plans in master, look out for the .yaml files starting with platform-..yaml and revert their respective changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants