View
2
Download
0
Category
Preview:
Citation preview
All code in https://github.com/Diana0604/moodle-local-custombehattests
How does behat code look like…?
Distribution of code
Mink extension
Mink extension
Login test
All defined steps are stored in /admin/tool/behat/index.php
Login testIn a few steps we’re capable of creating this simple test
Login testIn a few steps we’re capable of creating this simple test
Turn filter on
Turn filter on
Turn filter onWe can use their functions and the test works fine
Let’s try to write it in a more understandable way...
Turn filter on
Turn filter on
Let’s try to write it in a more understandable way...
Steps to program
Turn filter on
Steps to program
Turn filter on
1. Reproduce moodle structure2. Apply secret technique3. Run command php admin/tool/behat/cli/util.php --enable
behat_moodle_steps.php
behat_base.phpMink Extension
behat_my_base.php behat_my_steps.php
Structure of code
public
protected
Turn filter on
Simplified version of our code
behat_custom_base.php behat_custom_filter.php
Turn filter on
Steps to program
Turn filter on
1. Reproduce moodle structure2. Apply secret technique3. Run command php admin/tool/behat/cli/util.php --enable
Steps to program
Turn filter on
Steps to program
Turn filter on
1. Reproduce moodle structure2. Apply secret technique3. Run command php admin/tool/behat/cli/util.php --enable
Simplified version of our code
behat_general.php
behat_custom_filter.php
Turn filter on
Steps to program
Turn filter on
1. Reproduce moodle structure2. Apply secret technique3. Run command php admin/tool/behat/cli/util.php --enable
Simplified version of our code
behat_custom_base.php behat_custom_filter.php
Turn filter on
Turn filter on
Simplified version of our code
Simplified version of our code
behat_custom_base.php behat_custom_filter.php
Let’s try to write it in a more understandable way...
Turn filter on
Steps to program
Turn filter on
1. Reproduce moodle structure2. Apply secret technique3. Run command php admin/tool/behat/cli/util.php --enable
Thank you
diana@wiris.com
All code in https://github.com/Diana0604/moodle-local-custombehattests
Recommended