-
Notifications
You must be signed in to change notification settings - Fork 60
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
Behat test optimisations #765
Labels
improvement
Something which improves an existing feature in some way (UX, UI, Design, Functionality)
test
Something which targets automated tests (Behat, PHPUnit)
Comments
marxjohnson
added
the
new
Something which has been reported but has not yet beeen triaged by the team
label
Nov 22, 2024
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…oodle-an-hochschulen#765) This creates generators and named selectors for smart menus and smart menu items, plus some navigation URLs for the smart menu settings forms.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…dle-an-hochschulen#765). This performs several optimisations to make these tests a lot faster. Creation of smart menus and menu item has been changed to use generators, rather than filling the forms each time. Manual navigation has been replaced with `I am on the 'identifier' 'type' page` as much as possible. The assertions being made have been optimised. Previously, every assertion of what was in a menu was opening each menu location and checking for each item. Given that there's no option to display different items when a menu is in different location, a lot of this is redunant, and actually opening each menu takes time. I have optimised this so that one scenario does a check that the menu opens and the items are actually visible. Then each scenario tests than an expected item exists in each menu (without opening the menu) and checks for subsequent items just check existance in a single menu. This balances coverage of the different functionality with speed and conciseness of tests.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…hochschulen#765) Navigation steps have been optimised a bit, creation of blocks now uses generators, and @javascript has been removed from tests that do not require it. Only tests using the off-canvas block region need Javascript since it opens the overlay. Otherwise, we are just checking whether block regions exist or not under various circumstances, which can be done much quicker without Javascript.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…le-an-hochschulen#765) As with other smart menu features, this uses generators, navigation steps and named selectors to speed up the tests. There is more that can be done to the feature, as time allows.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…oodle-an-hochschulen#765) This creates generators and named selectors for smart menus and smart menu items, plus some navigation URLs for the smart menu settings forms.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…dle-an-hochschulen#765). This performs several optimisations to make these tests a lot faster. Creation of smart menus and menu item has been changed to use generators, rather than filling the forms each time. Manual navigation has been replaced with `I am on the 'identifier' 'type' page` as much as possible. The assertions being made have been optimised. Previously, every assertion of what was in a menu was opening each menu location and checking for each item. Given that there's no option to display different items when a menu is in different location, a lot of this is redunant, and actually opening each menu takes time. I have optimised this so that one scenario does a check that the menu opens and the items are actually visible. Then each scenario tests than an expected item exists in each menu (without opening the menu) and checks for subsequent items just check existance in a single menu. This balances coverage of the different functionality with speed and conciseness of tests.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…hochschulen#765) Navigation steps have been optimised a bit, creation of blocks now uses generators, and @javascript has been removed from tests that do not require it. Only tests using the off-canvas block region need Javascript since it opens the overlay. Otherwise, we are just checking whether block regions exist or not under various circumstances, which can be done much quicker without Javascript.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…le-an-hochschulen#765) As with other smart menu features, this uses generators, navigation steps and named selectors to speed up the tests. There is more that can be done to the feature, as time allows.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…oodle-an-hochschulen#765) This creates generators and named selectors for smart menus and smart menu items, plus some navigation URLs for the smart menu settings forms.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…dle-an-hochschulen#765). This performs several optimisations to make these tests a lot faster. Creation of smart menus and menu item has been changed to use generators, rather than filling the forms each time. Manual navigation has been replaced with `I am on the 'identifier' 'type' page` as much as possible. The assertions being made have been optimised. Previously, every assertion of what was in a menu was opening each menu location and checking for each item. Given that there's no option to display different items when a menu is in different location, a lot of this is redunant, and actually opening each menu takes time. I have optimised this so that one scenario does a check that the menu opens and the items are actually visible. Then each scenario tests than an expected item exists in each menu (without opening the menu) and checks for subsequent items just check existance in a single menu. This balances coverage of the different functionality with speed and conciseness of tests.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…hochschulen#765) Navigation steps have been optimised a bit, creation of blocks now uses generators, and @javascript has been removed from tests that do not require it. Only tests using the off-canvas block region need Javascript since it opens the overlay. Otherwise, we are just checking whether block regions exist or not under various circumstances, which can be done much quicker without Javascript.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…le-an-hochschulen#765) As with other smart menu features, this uses generators, navigation steps and named selectors to speed up the tests. There is more that can be done to the feature, as time allows.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…oodle-an-hochschulen#765) This creates generators and named selectors for smart menus and smart menu items, plus some navigation URLs for the smart menu settings forms.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…dle-an-hochschulen#765). This performs several optimisations to make these tests a lot faster. Creation of smart menus and menu item has been changed to use generators, rather than filling the forms each time. Manual navigation has been replaced with `I am on the 'identifier' 'type' page` as much as possible. The assertions being made have been optimised. Previously, every assertion of what was in a menu was opening each menu location and checking for each item. Given that there's no option to display different items when a menu is in different location, a lot of this is redunant, and actually opening each menu takes time. I have optimised this so that one scenario does a check that the menu opens and the items are actually visible. Then each scenario tests than an expected item exists in each menu (without opening the menu) and checks for subsequent items just check existance in a single menu. This balances coverage of the different functionality with speed and conciseness of tests.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…hochschulen#765) Navigation steps have been optimised a bit, creation of blocks now uses generators, and @javascript has been removed from tests that do not require it. Only tests using the off-canvas block region need Javascript since it opens the overlay. Otherwise, we are just checking whether block regions exist or not under various circumstances, which can be done much quicker without Javascript.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…le-an-hochschulen#765) As with other smart menu features, this uses generators, navigation steps and named selectors to speed up the tests. There is more that can be done to the feature, as time allows.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…dle-an-hochschulen#765). This performs several optimisations to make these tests a lot faster. Creation of smart menus and menu item has been changed to use generators, rather than filling the forms each time. Manual navigation has been replaced with `I am on the 'identifier' 'type' page` as much as possible. The assertions being made have been optimised. Previously, every assertion of what was in a menu was opening each menu location and checking for each item. Given that there's no option to display different items when a menu is in different location, a lot of this is redunant, and actually opening each menu takes time. I have optimised this so that one scenario does a check that the menu opens and the items are actually visible. Then each scenario tests than an expected item exists in each menu (without opening the menu) and checks for subsequent items just check existance in a single menu. This balances coverage of the different functionality with speed and conciseness of tests.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…hochschulen#765) Navigation steps have been optimised a bit, creation of blocks now uses generators, and @javascript has been removed from tests that do not require it. Only tests using the off-canvas block region need Javascript since it opens the overlay. Otherwise, we are just checking whether block regions exist or not under various circumstances, which can be done much quicker without Javascript.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…le-an-hochschulen#765) As with other smart menu features, this uses generators, navigation steps and named selectors to speed up the tests. There is more that can be done to the feature, as time allows.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…dle-an-hochschulen#765). This performs several optimisations to make these tests a lot faster. Creation of smart menus and menu item has been changed to use generators, rather than filling the forms each time. Manual navigation has been replaced with `I am on the 'identifier' 'type' page` as much as possible. The assertions being made have been optimised. Previously, every assertion of what was in a menu was opening each menu location and checking for each item. Given that there's no option to display different items when a menu is in different location, a lot of this is redunant, and actually opening each menu takes time. I have optimised this so that one scenario does a check that the menu opens and the items are actually visible. Then each scenario tests than an expected item exists in each menu (without opening the menu) and checks for subsequent items just check existance in a single menu. This balances coverage of the different functionality with speed and conciseness of tests.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…hochschulen#765) Navigation steps have been optimised a bit, creation of blocks now uses generators, and @javascript has been removed from tests that do not require it. Only tests using the off-canvas block region need Javascript since it opens the overlay. Otherwise, we are just checking whether block regions exist or not under various circumstances, which can be done much quicker without Javascript.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…le-an-hochschulen#765) As with other smart menu features, this uses generators, navigation steps and named selectors to speed up the tests. There is more that can be done to the feature, as time allows.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…dle-an-hochschulen#765). This performs several optimisations to make these tests a lot faster. Creation of smart menus and menu item has been changed to use generators, rather than filling the forms each time. Manual navigation has been replaced with `I am on the 'identifier' 'type' page` as much as possible. The assertions being made have been optimised. Previously, every assertion of what was in a menu was opening each menu location and checking for each item. Given that there's no option to display different items when a menu is in different location, a lot of this is redunant, and actually opening each menu takes time. I have optimised this so that one scenario does a check that the menu opens and the items are actually visible. Then each scenario tests than an expected item exists in each menu (without opening the menu) and checks for subsequent items just check existance in a single menu. This balances coverage of the different functionality with speed and conciseness of tests.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…hochschulen#765) Navigation steps have been optimised a bit, creation of blocks now uses generators, and @javascript has been removed from tests that do not require it. Only tests using the off-canvas block region need Javascript since it opens the overlay. Otherwise, we are just checking whether block regions exist or not under various circumstances, which can be done much quicker without Javascript.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 22, 2024
…le-an-hochschulen#765) As with other smart menu features, this uses generators, navigation steps and named selectors to speed up the tests. There is more that can be done to the feature, as time allows.
abias
added
test
Something which targets automated tests (Behat, PHPUnit)
improvement
Something which improves an existing feature in some way (UX, UI, Design, Functionality)
labels
Nov 22, 2024
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 25, 2024
…le-an-hochschulen#765) As with other smart menu features, this uses generators, navigation steps and named selectors to speed up the tests. There is more that can be done to the feature, as time allows.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 25, 2024
…oodle-an-hochschulen#765) This creates generators and named selectors for smart menus and smart menu items, plus some navigation URLs for the smart menu settings forms.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 25, 2024
…dle-an-hochschulen#765). This performs several optimisations to make these tests a lot faster. Creation of smart menus and menu item has been changed to use generators, rather than filling the forms each time. Manual navigation has been replaced with `I am on the 'identifier' 'type' page` as much as possible. The assertions being made have been optimised. Previously, every assertion of what was in a menu was opening each menu location and checking for each item. Given that there's no option to display different items when a menu is in different location, a lot of this is redunant, and actually opening each menu takes time. I have optimised this so that one scenario does a check that the menu opens and the items are actually visible. Then each scenario tests than an expected item exists in each menu (without opening the menu) and checks for subsequent items just check existance in a single menu. This balances coverage of the different functionality with speed and conciseness of tests.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 25, 2024
…hochschulen#765) Navigation steps have been optimised a bit, creation of blocks now uses generators, and @javascript has been removed from tests that do not require it. Only tests using the off-canvas block region need Javascript since it opens the overlay. Otherwise, we are just checking whether block regions exist or not under various circumstances, which can be done much quicker without Javascript.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 25, 2024
…le-an-hochschulen#765) As with other smart menu features, this uses generators, navigation steps and named selectors to speed up the tests. There is more that can be done to the feature, as time allows.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 25, 2024
…le-an-hochschulen#765) As with other smart menu features, this uses generators, navigation steps and named selectors to speed up the tests. There is more that can be done to the feature, as time allows.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 25, 2024
…le-an-hochschulen#765) As with other smart menu features, this uses generators, navigation steps and named selectors to speed up the tests. There is more that can be done to the feature, as time allows.
marxjohnson
added a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Nov 25, 2024
…le-an-hochschulen#765) As with other smart menu features, this uses generators, navigation steps and named selectors to speed up the tests. There is more that can be done to the feature, as time allows.
abias
moved this from Ready for REVIEW
to In Progress REVIEW
in Boost Union Planning Board
Dec 6, 2024
abias
pushed a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Dec 7, 2024
…oodle-an-hochschulen#765) This creates generators and named selectors for smart menus and smart menu items, plus some navigation URLs for the smart menu settings forms.
abias
pushed a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Dec 7, 2024
…dle-an-hochschulen#765). This performs several optimisations to make these tests a lot faster. Creation of smart menus and menu item has been changed to use generators, rather than filling the forms each time. Manual navigation has been replaced with `I am on the 'identifier' 'type' page` as much as possible. The assertions being made have been optimised. Previously, every assertion of what was in a menu was opening each menu location and checking for each item. Given that there's no option to display different items when a menu is in different location, a lot of this is redunant, and actually opening each menu takes time. I have optimised this so that one scenario does a check that the menu opens and the items are actually visible. Then each scenario tests than an expected item exists in each menu (without opening the menu) and checks for subsequent items just check existance in a single menu. This balances coverage of the different functionality with speed and conciseness of tests.
abias
pushed a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Dec 7, 2024
…hochschulen#765) Navigation steps have been optimised a bit, creation of blocks now uses generators, and @javascript has been removed from tests that do not require it. Only tests using the off-canvas block region need Javascript since it opens the overlay. Otherwise, we are just checking whether block regions exist or not under various circumstances, which can be done much quicker without Javascript.
abias
pushed a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Dec 7, 2024
…le-an-hochschulen#765) As with other smart menu features, this uses generators, navigation steps and named selectors to speed up the tests. There is more that can be done to the feature, as time allows.
abias
pushed a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Dec 7, 2024
…oodle-an-hochschulen#765) This creates generators and named selectors for smart menus and smart menu items, plus some navigation URLs for the smart menu settings forms.
abias
pushed a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Dec 7, 2024
…dle-an-hochschulen#765). This performs several optimisations to make these tests a lot faster. Creation of smart menus and menu item has been changed to use generators, rather than filling the forms each time. Manual navigation has been replaced with `I am on the 'identifier' 'type' page` as much as possible. The assertions being made have been optimised. Previously, every assertion of what was in a menu was opening each menu location and checking for each item. Given that there's no option to display different items when a menu is in different location, a lot of this is redunant, and actually opening each menu takes time. I have optimised this so that one scenario does a check that the menu opens and the items are actually visible. Then each scenario tests than an expected item exists in each menu (without opening the menu) and checks for subsequent items just check existance in a single menu. This balances coverage of the different functionality with speed and conciseness of tests.
abias
pushed a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Dec 7, 2024
…hochschulen#765) Navigation steps have been optimised a bit, creation of blocks now uses generators, and @javascript has been removed from tests that do not require it. Only tests using the off-canvas block region need Javascript since it opens the overlay. Otherwise, we are just checking whether block regions exist or not under various circumstances, which can be done much quicker without Javascript.
abias
pushed a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Dec 7, 2024
…le-an-hochschulen#765) As with other smart menu features, this uses generators, navigation steps and named selectors to speed up the tests. There is more that can be done to the feature, as time allows.
abias
added a commit
that referenced
this issue
Dec 7, 2024
Behat optimisations, addresses #765 (405 backport)
abias
pushed a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Dec 7, 2024
…oodle-an-hochschulen#765) This creates generators and named selectors for smart menus and smart menu items, plus some navigation URLs for the smart menu settings forms.
abias
pushed a commit
to marxjohnson/moodle-theme_boost_union
that referenced
this issue
Dec 7, 2024
…le-an-hochschulen#765) As with other smart menu features, this uses generators, navigation steps and named selectors to speed up the tests. There is more that can be done to the feature, as time allows.
abias
added a commit
that referenced
this issue
Dec 7, 2024
Behat optimisations, addresses #765 (404 backport)
abias
added a commit
that referenced
this issue
Dec 7, 2024
abias
added a commit
that referenced
this issue
Dec 7, 2024
…at-optimisations-404 Revert " Behat optimisations, addresses #765 (404 backport)"
abias
moved this from In Progress REVIEW
to Ready for BACKPORT
in Boost Union Planning Board
Dec 7, 2024
abias
moved this from Ready for BACKPORT
to Ready for RELEASE
in Boost Union Planning Board
Dec 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
improvement
Something which improves an existing feature in some way (UX, UI, Design, Functionality)
test
Something which targets automated tests (Behat, PHPUnit)
This plugin has a very comprehensive suite of behat tests, which is good, especially considering the range of features it implements.
However, the current suite takes about 4 hours to run, which presents a bit of a barrier when contributing fixes.
I captured the timings (in seconds) for each feature. Looking at the smart menu tests in particular, there is definitely scope for optimising these with generators, navigation URLs and named selectors. I will submit a branch with some improvements.
The text was updated successfully, but these errors were encountered: