-
-
Notifications
You must be signed in to change notification settings - Fork 436
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
Get functional test suite working on GitHub Actions #945
Conversation
Made a lot of progress but hit a wall: https://travis-ci.org/github/OpenMage/magento-lts/jobs/683167264
This code is not in our repo, though.. It is in magento/mtf. |
Latest progress: https://travis-ci.org/github/OpenMage/magento-lts/builds/683476886 |
I got it to execute PHPUnit on PHP 7.2 with no errors but for some reason no tests were actually run.. I don't know anything about the MTF framework. Does anyone else have any clues as to how to get this to run? |
Runs on PHP 7.2, 7.3 and 7.4, but times out with no details about what errors occurred... I suppose this would need to be run locally to debug it further.. :( |
for the record, here is the instruction for the old mtf framework for m1. If we find it useful we should fork it in openmage and adapt to suite our needs. |
when I try to run
I'm getting
|
7c35cee
to
e544ea9
Compare
I've took the liberty to rebase the branch on top of current 1.9.4.x and add a commit with executable permissions for sh scripts |
.travis.yml
Outdated
- '! find app/design -type f -name "*.phtml" -exec php -d error_reporting=32767 -l {} \; 2>&1 >&- | grep "^"' | ||
- if [ $TEST_SUITE == "static" ]; then ! find . -not \( -path ./.phpstorm.meta.php -prune \) -not \( -path ./lib/PEAR -prune \) -not \( -path ./lib/phpseclib -prune \) -not \( -path ./lib/Zend -prune \) -type f -name "*.php" -exec php -d error_reporting=32767 -l {} \; 2>&1 >&- | grep "^"; fi | ||
- if [ $TEST_SUITE == "static" ]; then ! find app/design -type f -name "*.phtml" -exec php -d error_reporting=32767 -l {} \; 2>&1 >&- | grep "^"; fi | ||
- if [ $TEST_SUITE == "functional" ]; then dev/tests/functional/vendor/phpunit/phpunit/phpunit -c dev/tests/$TEST_SUITE; fi |
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.
Functional tests takes more than 20 mintes and you have to add travis_wait 30
otherwise task will fail with error: No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
My sugesstion:
- if [ $TEST_SUITE == "functional" ]; then travis_wait 30 dev/tests/functional/vendor/phpunit/phpunit/phpunit -c dev/tests/$TEST_SUITE; fi
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.
Thanks @szymonbdeligo I'll give it a go!
Tests are still failing, I think it is unable to login for some reason. I changed the password to match but may have missed something... https://travis-ci.org/github/OpenMage/magento-lts/jobs/700745572 |
it's been more than 2 years without movement on this PR, I'll close it but can always be reopened in case somebody want to continue it. |
This comment has been minimized.
This comment has been minimized.
@colinmollenhour follow your commits ... absolutly awesome ❤️ |
c8c9cbd
to
df8f211
Compare
Sooo close... https://github.com/OpenMage/magento-lts/actions/runs/3890167666/jobs/6639043916#step:16:18 EDIT: The Apache test requests are failing but do not trigger an error so I think that is actually the issue.. I'm not familiar with |
Sadly I must give up on this for a while.. If anyone wants to help troubleshoot, please be my guest!
|
Invading to try something 🕵️ |
I think we have some progress. 503 error is substituted by 403 when requesting |
I've no time at the moment ... can you try |
commit 974fb37 Author: Mohamed ELIDRISSI <67818913+elidrissidev@users.noreply.github.com> Date: Fri Mar 10 10:15:57 2023 +0100 Remove `chroot` and `chdir` completely commit ded6e16 Author: Mohamed ELIDRISSI <67818913+elidrissidev@users.noreply.github.com> Date: Fri Mar 10 10:13:08 2023 +0100 Comment out `chroot` and `chdir` commit 6fd3aba Author: Sven Reichel <github-sr@hotmail.com> Date: Sun Jan 15 02:39:27 2023 +0100 Test No3 commit 943f5c2 Author: Sven Reichel <github-sr@hotmail.com> Date: Sun Jan 15 02:19:36 2023 +0100 Test No2 commit acf73d7 Author: Sven Reichel <github-sr@hotmail.com> Date: Sun Jan 15 01:53:48 2023 +0100 Test commit f77300c Author: Mohamed ELIDRISSI <67818913+elidrissidev@users.noreply.github.com> Date: Wed Jan 11 11:50:43 2023 +0100 Remove ProxyPassMatch from apache site Should fallback to php7.3-fpm.conf since it's enabled AFAIK commit d633e04 Author: Colin Mollenhour <colin@mollenhour.com> Date: Wed Jan 11 01:07:57 2023 -0500 Troubleshooting Selenium/Apache commit 59d6343 Author: Colin Mollenhour <colin@mollenhour.com> Date: Wed Jan 11 01:02:03 2023 -0500 Troubleshooting Selenium/Apache commit df8f211 Author: Colin Mollenhour <colin@mollenhour.com> Date: Tue Jan 10 18:27:56 2023 -0500 Migrate MTF from Travis to Github Actions. First attempt. commit 46e5c36 Merge: b0acd23 bd0cb12 Author: Colin Mollenhour <colin@mollenhour.com> Date: Tue Jan 10 16:55:59 2023 -0500 Merge remote-tracking branch 'openmage/1.9.4.x' into functional-test-suite commit b0acd23 Author: akrzemianowski <44834491+akrzemianowski@users.noreply.github.com> Date: Mon Jun 29 16:11:44 2020 +0200 Fixed issue with admin login after forced password rehash (#1071) commit 24e1d5c Author: szymonbdeligo <62687886+szymonbdeligo@users.noreply.github.com> Date: Thu Jun 25 00:40:51 2020 +0200 Fix static tests forPHP 7.4 (#1058) commit 08c79ad Author: Colin Mollenhour <colin@mollenhour.com> Date: Mon Jun 22 00:57:39 2020 -0400 Fix install command to use same password as mtf. commit 58ff3c6 Author: Colin Mollenhour <colin@mollenhour.com> Date: Sun Jun 21 20:44:13 2020 -0400 Add travis timeout for 30 minutes as per @szymonbdeligo. commit e544ea9 Author: Tymoteusz Motylewski <t.motylewski@gmail.com> Date: Mon May 18 22:49:23 2020 +0200 Make script files executable commit 17a4131 Author: Colin Mollenhour <colin@mollenhour.com> Date: Tue May 5 18:14:12 2020 -0400 Add script for running MTF locally via Docker. commit 8219636 Author: Colin Mollenhour <colin@mollenhour.com> Date: Tue May 5 17:03:45 2020 -0400 Remove DownloaderPart2Test and DownloaderTest as they do not run and we do not support downloader. commit 4620035 Author: Colin Mollenhour <colin@mollenhour.com> Date: Tue May 5 15:17:47 2020 -0400 Fix Composer install for PHP 7.4 commit 2aed58c Author: Colin Mollenhour <colin@mollenhour.com> Date: Tue May 5 15:13:59 2020 -0400 Generate tests and remove filter. commit 8ff94e7 Author: Colin Mollenhour <colin@mollenhour.com> Date: Tue May 5 14:35:23 2020 -0400 Try to reconcile magento/mtf updates and PHPUnit updates. commit 6eee8a0 Author: Colin Mollenhour <colin@mollenhour.com> Date: Tue May 5 12:56:59 2020 -0400 Disable `mtf troubleshooting:check-all` command as it appears to only fork for Magento 2 commit 50b837e Author: Colin Mollenhour <colin@mollenhour.com> Date: Mon May 4 20:13:41 2020 -0400 Try updating PHPUnit dependencies. May require PHPUnit 8. commit 2deb37d Author: Colin Mollenhour <colin@mollenhour.com> Date: Mon May 4 20:02:20 2020 -0400 Trying Magento MTF rc64. commit 6ac2ed3 Author: Colin Mollenhour <colin@mollenhour.com> Date: Mon May 4 19:12:08 2020 -0400 Add back troubleshooting:check-all step. commit 5095481 Author: Colin Mollenhour <colin@mollenhour.com> Date: Mon May 4 19:08:10 2020 -0400 Add missing travis_acceptance.xml commit a0f4b10 Author: Colin Mollenhour <colin@mollenhour.com> Date: Mon May 4 18:51:56 2020 -0400 Fix before_script.sh for functional test. Skip composer install for static test. commit b9134fe Author: Colin Mollenhour <colin@mollenhour.com> Date: Mon May 4 18:37:24 2020 -0400 Fix invalid password for admin, remove unneeded static test steps. commit 01e04da Author: Colin Mollenhour <colin@mollenhour.com> Date: Mon May 4 18:23:58 2020 -0400 Fix Magento install. commit 30564cc Author: Colin Mollenhour <colin@mollenhour.com> Date: Mon May 4 18:09:32 2020 -0400 Shell scriupts must be executable. commit c57d92c Author: Colin Mollenhour <colin@mollenhour.com> Date: Mon May 4 18:04:19 2020 -0400 First attempt to get functional tests working using magento2 travis files. Conflicts: dev/tests/functional/lib/Magento/Mtf/App/State/AbstractState.php dev/tests/functional/lib/Magento/Mtf/App/State/State1.php dev/tests/functional/lib/Magento/Mtf/Client/Driver/Selenium/Driver.php dev/tests/functional/lib/Magento/Mtf/Client/Element/SimpleElement.php dev/tests/functional/lib/Magento/Mtf/Util/Generate/Page.php
974fb37
to
b5df99e
Compare
Rebased onto main. These files were deleted in upstream, I am not sure why or if it is ok?
|
question: does it still make sense in 2024 to keep this open? |
getting the functional testsuite to work again would at least increase our coverage a lot lot. |
I'm on the fence.. It would be great to leverage the existing work but at the same time it seems kinda ancient and klunky.. I'd much rather use something like Cypress (I'm sure there are many other good choices) but we'd be starting from scratch. As far as my existing work on this PR, if it was for nothing that is ok - no sunk cost bias here. I may know a company that would be willing to sponsor the development of a modern test suite if it could be done fairly fast (weeks or months, not years). Is anyone interested in that opportunity? |
Any objections to closing this PR? |
Cypress lgtm but its not free. What alternatives we have? Selenium? ...? |
Cypress has a free MIT-licensed version. I think it's when you get into parallel pipeline running and UI features that it's paid. There are also some ways around this as well, but the open source version has been sufficient for us. |
There is also Playwright. From what I've seen, Cypress and Playwright are the best choices in my opinion. The free version of Cypress is definitely sufficient for our purposes. |
@colinmollenhour, I'd go for it. Not weeks, not years, but months ... |
Goal: get the Magento Test Framework tests working via GitHub Actions so we actually have a robust functional test suite.