Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Acceptance testing/Contributing automated tests: Difference between revisions

From MoodleDocs
(New features with acceptance tests)
(Update link for Top priority tests for automation)
Line 2: Line 2:


We are aiming to automate as many of these tests as possible using Moodle's new behat-based testing framework, so that they can be run weekly, and so that real users can focus on more exploratory testing instead. Currently there are over 400 MDLQA tests, so help in automating them is much appreciated!
We are aiming to automate as many of these tests as possible using Moodle's new behat-based testing framework, so that they can be run weekly, and so that real users can focus on more exploratory testing instead. Currently there are over 400 MDLQA tests, so help in automating them is much appreciated!
==Automating a test==
==Automating a test==
 
# Choose a test from this list [[Acceptance_testing/Contributing_automated_tests#Quick_start:_Test_automating|quick tests to automate]] or from here if the previous list is empty: [https://tracker.moodle.org/issues/?jql=parent%20%3D%20MDLQA-1%20and%20priority%20%3D%20Blocker%20and%20labels%20in%20(mdlqa_conversion) Top priority MDLQA tests to be automated].
# Choose a test from this list [[Acceptance_testing/Contributing_automated_tests#Quick_start:_Test_automating|quick tests to automate]] or from here if the previous list is empty: [https://tracker.moodle.org/issues/?jql=parent%20%3D%20%4DDLQA-1%20and%20priority%20%3D%20Blocker Top priority MDLQA tests to be automated].
# Create a new MDL issue with summary 'Automate MDLQA-wxyz' and component 'Automated functional tests' and any MDLQA component such as 'Forum' which is also an MDL component.
# Create a new MDL issue with summary 'Automate MDLQA-wxyz' and component 'Automated functional tests' and any MDLQA component such as 'Forum' which is also an MDL component.
# Add the '''mdlqa_conversion''' label to the new MDL issue
# Add the '''mdlqa_conversion''' label to the new MDL issue
Line 11: Line 9:
# Follow the instructions provided in the section 'Writing features' in the [[Acceptance testing#Writing_features|Acceptance testing guide]].
# Follow the instructions provided in the section 'Writing features' in the [[Acceptance testing#Writing_features|Acceptance testing guide]].
# Include 'MDLQA-wxyz' and a short description of what is being automated to the commit message/s where the .feature files are added/edited.
# Include 'MDLQA-wxyz' and a short description of what is being automated to the commit message/s where the .feature files are added/edited.
''Many thanks for helping with test automating!''
''Many thanks for helping with test automating!''


Line 17: Line 14:
* [https://tracker.moodle.org/issues/?jql=parent%20%3D%20%4DDLQA-1%20and%20priority%20%3D%20Critical Secondary priority MDLQA tests to be automated]
* [https://tracker.moodle.org/issues/?jql=parent%20%3D%20%4DDLQA-1%20and%20priority%20%3D%20Critical Secondary priority MDLQA tests to be automated]
* [https://tracker.moodle.org/issues/?jql=parent%20%3D%20%4DDLQA-1%20and%20priority%20%3D%20Major More secondary priority MDLQA tests to be automated]
* [https://tracker.moodle.org/issues/?jql=parent%20%3D%20%4DDLQA-1%20and%20priority%20%3D%20Major More secondary priority MDLQA tests to be automated]
==Quick start: Test automating==
==Quick start: Test automating==
To skip steps 1. to 3. above, simply choose an issue from this list: [https://tracker.moodle.org/issues/?jql=labels%20%3D%20'mdlqa_conversion'%20and%20status%20%3D%20'open' Quick start test automating issues] and then follow the instructions provided in the section 'Writing features' in the [[Acceptance testing#Writing_features|Acceptance testing guide]].
To skip steps 1. to 3. above, simply choose an issue from this list: [https://tracker.moodle.org/issues/?jql=labels%20%3D%20'mdlqa_conversion'%20and%20status%20%3D%20'open' Quick start test automating issues] and then follow the instructions provided in the section 'Writing features' in the [[Acceptance testing#Writing_features|Acceptance testing guide]].
==New features with acceptance tests==
==New features with acceptance tests==
New features with acceptance test will be tested in '''next''' QA cycle '''only'''. After QA cycle is over, it will be moved from MDLQA-1 to MDLQA-5249.
New features with acceptance test will be tested in '''next''' QA cycle '''only'''. After QA cycle is over, it will be moved from MDLQA-1 to MDLQA-5249.
* Issues should be linked to new QA issue as "is a QA test written for"
* Issues should be linked to new QA issue as "is a QA test written for"
* QA issue should be marked with priority '''blocker'''
* QA issue should be marked with priority '''blocker'''
==Tests which cannot be automated==
==Tests which cannot be automated==
Certain tests cannot be automated, as they require integration with other systems, code base modifications or other actions outside the browser scope.
Certain tests cannot be automated, as they require integration with other systems, code base modifications or other actions outside the browser scope.


Line 35: Line 26:
* [https://tracker.moodle.org/issues/?jql=parent%20%3D%20%4DDLQA-1%20and%20priority%20%3D%20Minor MDLQA tests which are a challenge to automate]
* [https://tracker.moodle.org/issues/?jql=parent%20%3D%20%4DDLQA-1%20and%20priority%20%3D%20Minor MDLQA tests which are a challenge to automate]
* [https://tracker.moodle.org/issues/?jql=parent%20%3D%20%4DDLQA-1%20and%20priority%20%3D%20Trivial MDLQA tests impossible to automate]
* [https://tracker.moodle.org/issues/?jql=parent%20%3D%20%4DDLQA-1%20and%20priority%20%3D%20Trivial MDLQA tests impossible to automate]
New features and improvements which cannot have an automated test written for them should be labelled [https://tracker.moodle.org/issues/?jql=labels%20%3D%20qa_test_required qa_test_required] and detailed testing instructions provided which can then be used when writing a new MDLQA test.
New features and improvements which cannot have an automated test written for them should be labelled [https://tracker.moodle.org/issues/?jql=labels%20%3D%20qa_test_required qa_test_required] and detailed testing instructions provided which can then be used when writing a new MDLQA test.
==Removing automated tests from the list of manual QA tests==
==Removing automated tests from the list of manual QA tests==
When a test is automated, it needs to be moved from MDLQA-1 to MDLQA-5249.
When a test is automated, it needs to be moved from MDLQA-1 to MDLQA-5249.
[[Category:Quality Assurance]][[Category:Behat]]
[[Category:Quality Assurance]][[Category:Behat]]

Revision as of 08:32, 13 September 2021

The issue MDLQA-1 contains testing tasks required to manually test many of the features and functions of Moodle.

We are aiming to automate as many of these tests as possible using Moodle's new behat-based testing framework, so that they can be run weekly, and so that real users can focus on more exploratory testing instead. Currently there are over 400 MDLQA tests, so help in automating them is much appreciated!

Automating a test

  1. Choose a test from this list quick tests to automate or from here if the previous list is empty: [https://tracker.moodle.org/browse/MDLQA-1 MDLQA-1%20and%20priority%20%3D%20Blocker%20and%20labels%20in%20(mdlqa_conversion) Top priority MDLQA tests to be automated].
  2. Create a new MDL issue with summary 'Automate MDLQA-wxyz' and component 'Automated functional tests' and any MDLQA component such as 'Forum' which is also an MDL component.
  3. Add the mdlqa_conversion label to the new MDL issue
  4. Link to the MDLQA test by selecting 'Will help resolve' as the link type.
  5. Follow the instructions provided in the section 'Writing features' in the Acceptance testing guide.
  6. Include 'MDLQA-wxyz' and a short description of what is being automated to the commit message/s where the .feature files are added/edited.

Many thanks for helping with test automating!

Note: Once the 'Top priority MDLQA tests to be automated' list is reduced to zero, choose a test from the following lists:

Quick start: Test automating

To skip steps 1. to 3. above, simply choose an issue from this list: Quick start test automating issues and then follow the instructions provided in the section 'Writing features' in the Acceptance testing guide.

New features with acceptance tests

New features with acceptance test will be tested in next QA cycle only. After QA cycle is over, it will be moved from MDLQA-1 to MDLQA-5249.

  • Issues should be linked to new QA issue as "is a QA test written for"
  • QA issue should be marked with priority blocker

Tests which cannot be automated

Certain tests cannot be automated, as they require integration with other systems, code base modifications or other actions outside the browser scope.

Existing tests which have been identified as such are:

New features and improvements which cannot have an automated test written for them should be labelled qa_test_required and detailed testing instructions provided which can then be used when writing a new MDLQA test.

Removing automated tests from the list of manual QA tests

When a test is automated, it needs to be moved from MDLQA-1 to MDLQA-5249.