27
All code in https://github.com/Diana0604/moodle-local-custombehattests

All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

All code in https://github.com/Diana0604/moodle-local-custombehattests

Page 2: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

How does behat code look like…?

Page 3: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Distribution of code

Page 4: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Mink extension

Page 5: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Mink extension

Page 6: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Login test

All defined steps are stored in /admin/tool/behat/index.php

Page 7: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Login testIn a few steps we’re capable of creating this simple test

Page 8: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Login testIn a few steps we’re capable of creating this simple test

Page 9: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Turn filter on

Page 10: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Turn filter on

Page 11: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Turn filter onWe can use their functions and the test works fine

Page 12: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Let’s try to write it in a more understandable way...

Turn filter on

Page 13: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Turn filter on

Let’s try to write it in a more understandable way...

Page 14: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Steps to program

Turn filter on

Page 15: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Steps to program

Turn filter on

1. Reproduce moodle structure2. Apply secret technique3. Run command php admin/tool/behat/cli/util.php --enable

Page 16: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

behat_moodle_steps.php

behat_base.phpMink Extension

behat_my_base.php behat_my_steps.php

Structure of code

public

protected

Turn filter on

Page 17: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Simplified version of our code

behat_custom_base.php behat_custom_filter.php

Turn filter on

Page 18: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Steps to program

Turn filter on

1. Reproduce moodle structure2. Apply secret technique3. Run command php admin/tool/behat/cli/util.php --enable

Page 19: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Steps to program

Turn filter on

Page 20: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Steps to program

Turn filter on

1. Reproduce moodle structure2. Apply secret technique3. Run command php admin/tool/behat/cli/util.php --enable

Page 21: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Simplified version of our code

behat_general.php

behat_custom_filter.php

Turn filter on

Page 22: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Steps to program

Turn filter on

1. Reproduce moodle structure2. Apply secret technique3. Run command php admin/tool/behat/cli/util.php --enable

Page 23: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Simplified version of our code

behat_custom_base.php behat_custom_filter.php

Turn filter on

Page 24: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Turn filter on

Simplified version of our code

Simplified version of our code

behat_custom_base.php behat_custom_filter.php

Page 25: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Let’s try to write it in a more understandable way...

Turn filter on

Page 26: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Steps to program

Turn filter on

1. Reproduce moodle structure2. Apply secret technique3. Run command php admin/tool/behat/cli/util.php --enable

Page 27: All code in …Steps to program Turn filter on 1. Reproduce moodle structure 2. Apply secret technique 3. Run command php admin/tool/behat/cli/util.php --enable behat_moodle_steps

Thank you

[email protected]

All code in https://github.com/Diana0604/moodle-local-custombehattests