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

[E2E] macos tray test automation #2153

Merged
merged 14 commits into from
Apr 30, 2021

Conversation

adrianriobo
Copy link
Contributor

@adrianriobo adrianriobo commented Mar 25, 2021

Solution/Idea

Add E2E automation tests for macos tray. The automation for mac will use native solution based on applescripts to interact with the tray.

This PR includes the implementation for the initial set of e2e scenarios for ux components on MacOS platform. To accommodate that implementation a refactor on the testing structure was required in order to expand and reuse the functionality among all different types of test (integration and e2e)

Downstream CI run results for this PR:

The required parameters to run the ux scenarios are still missing on the downstream CI, ux feature was run manually on a mac instance with the current CRC version (1.25.0):

make -C macos_tray e2e GODOG_OPTS="--godog.tags='@darwin && @ux' --godog.format=junit" \
                BUNDLE_LOCATION="--bundle-location=''" \
                PULL_SECRET_FILE="--pull-secret-file=pull-secret" \
                INSTALLER_PATH="--installer-path=crc-macos-amd64.pkg" \
                USER_PASSWORD="--user-password=XXXX"

resulting on:

<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="crc" tests="7" skipped="0" failures="1" errors="0" time="1354.117782704">
  <testsuite name="Basic test" tests="0" skipped="0" failures="0" errors="0" time="0"></testsuite>
  <testsuite name="Behind proxy test" tests="0" skipped="0" failures="0" errors="0" time="0"></testsuite>
  <testsuite name="Certificate rotation test" tests="0" skipped="0" failures="0" errors="0" time="0"></testsuite>
  <testsuite name="End-to-end health check" tests="0" skipped="0" failures="0" errors="0" time="0"></testsuite>
  <testsuite name="Local image to image-registry" tests="0" skipped="0" failures="0" errors="0" time="0"></testsuite>
  <testsuite name="Operator from marketplace" tests="0" skipped="0" failures="0" errors="0" time="0"></testsuite>
  <testsuite name="Test configuration settings" tests="0" skipped="0" failures="0" errors="0" time="0"></testsuite>
  <testsuite name="ux" tests="7" skipped="0" failures="1" errors="0" time="1354.113146961">
    <testcase name="Install CRC" status="passed" time="33.613631749"></testcase>
    <testcase name="Install tray" status="passed" time="75.117393328"></testcase>
    <testcase name="Start Cluster" status="passed" time="476.660750086"></testcase>
    <testcase name="Connect the cluster #1" status="passed" time="16.173251692"></testcase>
    <testcase name="Connect the cluster #2" status="passed" time="30.273120298"></testcase>
    <testcase name="Stop Cluster" status="failed" time="323.139393178">
      <failure message="Step user should get notified with cluster state as stopped: notification: The OpenShift Cluster was successfully stopped. Timeout"></failure>
    </testcase>
    <testcase name="Restart Cluster" status="passed" time="348.496128553"></testcase>
  </testsuite>
</testsuites>

*errors are directly realated with tray-macos issue #84

@centos-ci
Copy link
Collaborator

Can one of the admins verify this patch?

@adrianriobo
Copy link
Contributor Author

Related to #2190 current install scenario fails randomly

@adrianriobo adrianriobo force-pushed the e2e_macos_tray branch 4 times, most recently from ebdfed1 to 72b2f65 Compare April 14, 2021 12:30
@adrianriobo adrianriobo force-pushed the e2e_macos_tray branch 3 times, most recently from 17eba5e to aa07c17 Compare April 16, 2021 14:04
@adrianriobo adrianriobo changed the title WIP: [E2E] macos tray test automation [E2E] macos tray test automation Apr 16, 2021
@guillaumerose guillaumerose added the has-to-be-in-release This PR need to go in coming release. label Apr 27, 2021
@guillaumerose
Copy link
Contributor

Can you rebase ? Otherwise,
/lgtm

Thanks a lot for automating this!

Copy link
Contributor

@jsliacan jsliacan left a comment

Choose a reason for hiding this comment

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

Thanks for refactoring :). I left a few minor comments and I didn't check if the build tags are all well placed. But I assume they are since you ran it on all platforms. Otherwise LGTM!

test/e2e/features/ux.feature Show resolved Hide resolved
test/e2e/features/ux.feature Outdated Show resolved Hide resolved
test/e2e/features/ux.feature Show resolved Hide resolved
test/e2e/features/ux.feature Outdated Show resolved Hide resolved
test/e2e/features/ux.feature Outdated Show resolved Hide resolved
test/e2e/features/ux.feature Outdated Show resolved Hide resolved
test/extended/crc/cmd/cmd.go Outdated Show resolved Hide resolved
test/extended/crc/ux/notification/notification_unix.go Outdated Show resolved Hide resolved
test/extended/crc/ux/tray/const.go Outdated Show resolved Hide resolved
test/extended/crc/ux/tray/tray_windows.go Outdated Show resolved Hide resolved
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adrianriobo, jsliacan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot
Copy link

New changes are detected. LGTM label has been removed.

@adrianriobo adrianriobo force-pushed the e2e_macos_tray branch 2 times, most recently from ee347e3 to 9123c46 Compare April 28, 2021 12:34
@guillaumerose
Copy link
Contributor

/retest

@guillaumerose
Copy link
Contributor

Looks good. Let's use them for the next release.

@guillaumerose guillaumerose merged commit f41cfd3 into crc-org:master Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved has-to-be-in-release This PR need to go in coming release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants