-
Notifications
You must be signed in to change notification settings - Fork 197
Add blog strengthen longhorn with automated end-to-end tests #1295
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
base: master
Are you sure you want to change the base?
Add blog strengthen longhorn with automated end-to-end tests #1295
Conversation
Signed-off-by: Chris <chris.chien@suse.com>
11702ff to
cf648c9
Compare
sushant-suse
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, added some minor suggestions for your consideration.
Thanks.
|
|
||
| ### Why E2E Testing Matters for Longhorn | ||
|
|
||
| E2E testing is a core part of ensuring Longhorn remains stable, resilient, and production ready. While integration tests validate individual components, E2E tests validate the entire system under real-world conditions, especially automated tests from user-reported issues, disruptive operations such as node shutdowns or reboots, and scenarios that may be repeated hundred times to find stability issues. Automating these scenarios helps the QA team quickly validate every Longhorn release, reducing manual workload and ensuring issues are found early. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| E2E testing is a core part of ensuring Longhorn remains stable, resilient, and production ready. While integration tests validate individual components, E2E tests validate the entire system under real-world conditions, especially automated tests from user-reported issues, disruptive operations such as node shutdowns or reboots, and scenarios that may be repeated hundred times to find stability issues. Automating these scenarios helps the QA team quickly validate every Longhorn release, reducing manual workload and ensuring issues are found early. | |
| E2E testing is a core part of ensuring Longhorn remains stable, resilient, and production-ready. While integration tests validate individual components, E2E tests validate the entire system under real-world conditions; especially automated tests derived from user-reported issues, disruptive operations such as node shutdowns or reboots, and scenarios that may be repeated hundreds of times to uncover stability issues. Automating these scenarios helps the QA team quickly validate every Longhorn release, reducing manual workload and ensuring issues are found early. |
| - Longhorn upgrades | ||
| - Engine version validate | ||
|
|
||
| The integration test suite is gradually being deprecated as we plan to move all test cases into the E2E test framework. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The integration test suite is gradually being deprecated as we plan to move all test cases into the E2E test framework. | |
| The integration test suite is gradually being deprecated in favor of moving all test cases into the E2E test framework. |
|
|
||
| The E2E test suite is written in **Robot Framework** using a BDD-style structure. It focuses on: | ||
|
|
||
| - Converting user reported issues into automated test cases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - Converting user reported issues into automated test cases | |
| - Converting user-reported issues into automated test cases |
| - Node reboots | ||
| - Node power-down | ||
| - Network disconnect | ||
| - Automating [manual test cases](https://longhorn.github.io/longhorn-tests/manual/) that executed in release testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - Automating [manual test cases](https://longhorn.github.io/longhorn-tests/manual/) that executed in release testing | |
| - Automating [manual test cases](https://longhorn.github.io/longhorn-tests/manual/) that are executed during release testing |
| - Network disconnect | ||
| - Automating [manual test cases](https://longhorn.github.io/longhorn-tests/manual/) that executed in release testing | ||
|
|
||
| As part of ongoing improvements, integration tests are actively being **migrated into the E2E suite**. The idea is to eventually use one unified test framework. Since E2E is written in BDD style, it’s much easier to understand the test steps from the logs and see exactly why a test failed, which helps a lot when debugging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| As part of ongoing improvements, integration tests are actively being **migrated into the E2E suite**. The idea is to eventually use one unified test framework. Since E2E is written in BDD style, it’s much easier to understand the test steps from the logs and see exactly why a test failed, which helps a lot when debugging. | |
| As part of ongoing improvements, integration tests are actively being **migrated into the E2E suite**. The goal is to eventually use one unified test framework. Since E2E tests are written in a BDD-style format, it’s much easier to understand the test steps from the logs and see exactly why a test failed, which greatly helps with debugging. |
| e2e/keywords/*.resource | ||
| ``` | ||
|
|
||
| #### 5. Robot → Resource → Python Flow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #### 5. Robot → Resource → Python Flow | |
| #### 5. Robot → Resource → Python Flow | |
| (Python function that waits for the recurring job pod to start) | ||
| ``` | ||
|
|
||
| #### 6. Complete the test case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #### 6. Complete the test case | |
| #### 6. Complete the test case | |
| #### 6. Complete the test case | ||
| Following the above steps, convert each step in the [manual test case](https://longhorn.github.io/longhorn-tests/manual/release-specific/v1.1.0/recurring-backup-job-interruptions/) into clear, human-readable Robot Framework test case. | ||
|
|
||
| ## Run test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ## Run test | |
| ## Run a test | |
| Following the above steps, convert each step in the [manual test case](https://longhorn.github.io/longhorn-tests/manual/release-specific/v1.1.0/recurring-backup-job-interruptions/) into clear, human-readable Robot Framework test case. | ||
|
|
||
| ## Run test | ||
| From the `longhorn-tests/e2e` folder, execute the test with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| From the `longhorn-tests/e2e` folder, execute the test with: | |
| From the `longhorn-tests/e2e` folder, execute the test with: | |
| /run.sh -t "Recurring backup job interruptions when Allow Recurring Job While Volume Is Detached is disabled" | ||
| ``` | ||
|
|
||
| Robot Framework will generate a standard test report. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Robot Framework will generate a standard test report. | |
| Robot Framework will generate a standard test report. |
Which issue(s) this PR fixes:
Issue #
What this PR does / why we need it:
Add blog strengthen longhorn with automated end-to-end tests
Special notes for your reviewer:
Additional documentation or context