As we all know Odoo is basically a web based open source platform which act as a solution for all business requirements and Odoo module is a set of business logic which helps to enhance the excessive functionality or to add some new functionality in order.
Moodle My feedback: view and compare assessment feedback (MoodleMoot IE/UK 2017)Jessica Gramp
The Moodle My feedback plugin allows students and staff to compare grades and feedback for assessment activities such as Moodle Assignments, Turnitin Assignments, Workshops and Quizzes in a single interface. The report helps students identify similarities in their feedback from across Moodle courses, so they may improve their work in future assessments.
After a successful pilot in one UCL faculty, this plugin has now been rolled out to all staff and students across the university. It is also available for download from: https://moodle.org/plugins/view.php?plugin=report_myfeedback
This presentation will demonstrate the final version of the plugin and discuss ideas for future development that were not implemented in this initial project.
A video demonstration of the My feedback report is also available on YouTube: https://youtu.be/gI9Mq4qsFPs
As we all know Odoo is basically a web based open source platform which act as a solution for all business requirements and Odoo module is a set of business logic which helps to enhance the excessive functionality or to add some new functionality in order.
Moodle My feedback: view and compare assessment feedback (MoodleMoot IE/UK 2017)Jessica Gramp
The Moodle My feedback plugin allows students and staff to compare grades and feedback for assessment activities such as Moodle Assignments, Turnitin Assignments, Workshops and Quizzes in a single interface. The report helps students identify similarities in their feedback from across Moodle courses, so they may improve their work in future assessments.
After a successful pilot in one UCL faculty, this plugin has now been rolled out to all staff and students across the university. It is also available for download from: https://moodle.org/plugins/view.php?plugin=report_myfeedback
This presentation will demonstrate the final version of the plugin and discuss ideas for future development that were not implemented in this initial project.
A video demonstration of the My feedback report is also available on YouTube: https://youtu.be/gI9Mq4qsFPs
Converting PowerPoint to Interactive E-Learning with Storyline 360saikumarmba2023
Discover a comprehensive guide on seamlessly transforming PowerPoint presentations into dynamic and interactive e-learning courses using Articulate Storyline 360, a leading rapid authoring tool. With its intuitive PowerPoint-like interface, Storyline 360 simplifies the process for learning experts and subject matter experts (SMEs), enabling the creation of captivating and interactive e-learning content. Explore step-by-step instructions in this article to efficiently convert PPT to E-learning using Articulate Storyline 360.
Odoo E-Learning is a new module introduced in Odoo 13 version. The main vision of Odoo by this module is that which enables the user to manage and publish an E-Learning platform. Odoo E-learning module is use to create courses, configure quizzes and earn badges while attending courses.
My Feedback evaluation and ideas for better guidanceJessica Gramp
This presentation explains how the open source Moodle My Feedback plugin works and proposes some ideas to better support students to become self regulated learners and help them to reflect on their feedbackm, based on an evaluation undertaken at University College London (UCL).
The plugin is available from: https://moodle.org/plugins/view.php?plugin=report_myfeedback
For those who are in starting stage of Odoo development, it is a tough task for creating a new module. In this section let us look how to create a new module in the Odoo.
Odoo E-learning module can be used to create courses, configure quizzes and earn badges while attending courses. This is helpful for conducting internal training at the company for employees and helps in easy onboarding. Integrated gamification makes it a more joyful
Empowering students to improve with Moodle My Feedback - ALTC 2017Jessica Gramp
How the Moodle My Feedback report empowers students to improve with the help of their Personal Tutors. Video of presentation is available from: https://www.youtube.com/watch?v=wHFB8s0pTak&t=6m13s
Question bank improvements in Moodle 4.0 : A successful community collaborationTim Hunt
A talk given to the 2022 UK and Ireland MoodleMoot about a collaborative effort to improve the Question bank in Moodle 4.0 though a crowed-funded project developed by Catalyst IT AU.
Converting PowerPoint to Interactive E-Learning with Storyline 360saikumarmba2023
Discover a comprehensive guide on seamlessly transforming PowerPoint presentations into dynamic and interactive e-learning courses using Articulate Storyline 360, a leading rapid authoring tool. With its intuitive PowerPoint-like interface, Storyline 360 simplifies the process for learning experts and subject matter experts (SMEs), enabling the creation of captivating and interactive e-learning content. Explore step-by-step instructions in this article to efficiently convert PPT to E-learning using Articulate Storyline 360.
Odoo E-Learning is a new module introduced in Odoo 13 version. The main vision of Odoo by this module is that which enables the user to manage and publish an E-Learning platform. Odoo E-learning module is use to create courses, configure quizzes and earn badges while attending courses.
My Feedback evaluation and ideas for better guidanceJessica Gramp
This presentation explains how the open source Moodle My Feedback plugin works and proposes some ideas to better support students to become self regulated learners and help them to reflect on their feedbackm, based on an evaluation undertaken at University College London (UCL).
The plugin is available from: https://moodle.org/plugins/view.php?plugin=report_myfeedback
For those who are in starting stage of Odoo development, it is a tough task for creating a new module. In this section let us look how to create a new module in the Odoo.
Odoo E-learning module can be used to create courses, configure quizzes and earn badges while attending courses. This is helpful for conducting internal training at the company for employees and helps in easy onboarding. Integrated gamification makes it a more joyful
Empowering students to improve with Moodle My Feedback - ALTC 2017Jessica Gramp
How the Moodle My Feedback report empowers students to improve with the help of their Personal Tutors. Video of presentation is available from: https://www.youtube.com/watch?v=wHFB8s0pTak&t=6m13s
Question bank improvements in Moodle 4.0 : A successful community collaborationTim Hunt
A talk given to the 2022 UK and Ireland MoodleMoot about a collaborative effort to improve the Question bank in Moodle 4.0 though a crowed-funded project developed by Catalyst IT AU.
Looking after the Open University's MoodleTim Hunt
A talk Sharon Monie and I gave at #MootGlobal19 in Barcelona about some of the people, processes and tools we use to manage the Open University's Moodle sites.
This talk is about how the Open University installs and manages the STACK mathematical online assessment system so that it works reliably for our students and teachers. We are probably one of the largest users of STACK, in terms of questions answered per year.
The talk was give at The International STACK User Group Meeting in Edinburgh on Tuesday 30 April 2019.
2017 UK/IE MoodleMoot: What makes a good moodle quiz? Lessons from the Open U...Tim Hunt
A talk about two things in tandem: good practices for using the Moodle quiz; and how the quiz is used in reality at the Open University. Hopefully those two things have some things in common.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
E-commerce Application Development Company.pdfHornet Dynamics
Your business can reach new heights with our assistance as we design solutions that are specifically appropriate for your goals and vision. Our eCommerce application solutions can digitally coordinate all retail operations processes to meet the demands of the marketplace while maintaining business continuity.
OpenMetadata Community Meeting - 5th June 2024OpenMetadata
The OpenMetadata Community Meeting was held on June 5th, 2024. In this meeting, we discussed about the data quality capabilities that are integrated with the Incident Manager, providing a complete solution to handle your data observability needs. Watch the end-to-end demo of the data quality features.
* How to run your own data quality framework
* What is the performance impact of running data quality frameworks
* How to run the test cases in your own ETL pipelines
* How the Incident Manager is integrated
* Get notified with alerts when test cases fail
Watch the meeting recording here - https://www.youtube.com/watch?v=UbNOje0kf6E
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
Graspan: A Big Data System for Big Code AnalysisAftab Hussain
We built a disk-based parallel graph system, Graspan, that uses a novel edge-pair centric computation model to compute dynamic transitive closures on very large program graphs.
We implement context-sensitive pointer/alias and dataflow analyses on Graspan. An evaluation of these analyses on large codebases such as Linux shows that their Graspan implementations scale to millions of lines of code and are much simpler than their original implementations.
These analyses were used to augment the existing checkers; these augmented checkers found 132 new NULL pointer bugs and 1308 unnecessary NULL tests in Linux 4.4.0-rc5, PostgreSQL 8.3.9, and Apache httpd 2.2.18.
- Accepted in ASPLOS ‘17, Xi’an, China.
- Featured in the tutorial, Systemized Program Analyses: A Big Data Perspective on Static Analysis Scalability, ASPLOS ‘17.
- Invited for presentation at SoCal PLS ‘16.
- Invited for poster presentation at PLDI SRC ‘16.
Do you want Software for your Business? Visit Deuglo
Deuglo has top Software Developers in India. They are experts in software development and help design and create custom Software solutions.
Deuglo follows seven steps methods for delivering their services to their customers. They called it the Software development life cycle process (SDLC).
Requirement — Collecting the Requirements is the first Phase in the SSLC process.
Feasibility Study — after completing the requirement process they move to the design phase.
Design — in this phase, they start designing the software.
Coding — when designing is completed, the developers start coding for the software.
Testing — in this phase when the coding of the software is done the testing team will start testing.
Installation — after completion of testing, the application opens to the live server and launches!
Maintenance — after completing the software development, customers start using the software.
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Crescat
Crescat is industry-trusted event management software, built by event professionals for event professionals. Founded in 2017, we have three key products tailored for the live event industry.
Crescat Event for concert promoters and event agencies. Crescat Venue for music venues, conference centers, wedding venues, concert halls and more. And Crescat Festival for festivals, conferences and complex events.
With a wide range of popular features such as event scheduling, shift management, volunteer and crew coordination, artist booking and much more, Crescat is designed for customisation and ease-of-use.
Over 125,000 events have been planned in Crescat and with hundreds of customers of all shapes and sizes, from boutique event agencies through to international concert promoters, Crescat is rigged for success. What's more, we highly value feedback from our users and we are constantly improving our software with updates, new features and improvements.
If you plan events, run a venue or produce festivals and you're looking for ways to make your life easier, then we have a solution for you. Try our software for free or schedule a no-obligation demo with one of our product specialists today at crescat.io
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
GraphSummit Paris - The art of the possible with Graph TechnologyNeo4j
Sudhir Hasbe, Chief Product Officer, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Understanding Nidhi Software Pricing: A Quick Guide 🌟
Choosing the right software is vital for Nidhi companies to streamline operations. Our latest presentation covers Nidhi software pricing, key factors, costs, and negotiation tips.
📊 What You’ll Learn:
Key factors influencing Nidhi software price
Understanding the true cost beyond the initial price
Tips for negotiating the best deal
Affordable and customizable pricing options with Vector Nidhi Software
🔗 Learn more at: www.vectornidhisoftware.com/software-for-nidhi-company/
#NidhiSoftwarePrice #NidhiSoftware #VectorNidhi
In the ever-evolving landscape of technology, enterprise software development is undergoing a significant transformation. Traditional coding methods are being challenged by innovative no-code solutions, which promise to streamline and democratize the software development process.
This shift is particularly impactful for enterprises, which require robust, scalable, and efficient software to manage their operations. In this article, we will explore the various facets of enterprise software development with no-code solutions, examining their benefits, challenges, and the future potential they hold.
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
4. 4
A good example
Adapted from question/format/xml/tests/behat/import_export.feature
@qformat @qformat_xml
Feature: Test importing questions from Moodle XML format.
In order to reuse questions
As a teacher
I need to be able to import them in XML format.
@javascript @_file_upload
Scenario: import some multiple choice questions from Moodle XML format
Given the following "courses" exist:
| fullname | shortname |
| Test Course | TC100 |
And the following "users" exist:
| username |
| teacher |
And the following "course enrolments" exist:
| user | course | role |
| teacher | TC100 | editingteacher |
When I am on the "Course 1" "core_question > course question import" page logged in as "teacher"
And I set the field "id_format_xml" to "1"
And I upload "question/format/xml/tests/fixtures/multichoice.xml" file to "Import" filemanager
And I press "Import"
Then I should see "Parsing questions from import file."
And I should see "Importing 1 questions from file"
And I should see "What language is being spoken?"
5. 5
About Behat
Follows a simple script
- written in 'English’
Interacts with Moodle like a user would
- most like a screen-reader
Works in a separate Moodle install
- which starts empty for each scenario
Checks functionality, not visuals
How Behat works?
Let’s not go there!
8. 8
4-phase test pattern
See, for example, http://xunitpatterns.com/Four%20Phase%20Test.html
Setup
Execute
Verify
Clean-up not needed in Moodle
9. 9
A good example
Adapted from question/format/xml/tests/behat/import_export.feature
@qformat @qformat_xml
Feature: Test importing questions from Moodle XML format.
In order to reuse questions
As a teacher
I need to be able to import them in XML format.
@javascript @_file_upload
Scenario: import some multiple choice questions from Moodle XML format
Given the following "courses" exist:
| fullname | shortname |
| Test Course | TC100 |
And the following "users" exist:
| username |
| teacher |
And the following "course enrolments" exist:
| user | course | role |
| teacher | TC100 | editingteacher |
When I am on the "Course 1" "core_question > course question import" page logged in as "teacher"
And I set the field "id_format_xml" to "1"
And I upload "question/format/xml/tests/fixtures/multichoice.xml" file to "Import" filemanager
And I press "Import"
Then I should see "Parsing questions from import file."
And I should see "Importing 1 questions from file"
And I should see "What language is being spoken?"
10. 10
Good tests
Test one thing
Make it obvious what is being tested
Make it obvious what the expected behaviour is
Are well organised
Plugins -> Features -> Scenarios
12. 12
A bad example
Adapted from mod/openstudio/tests/behat/content_block_socical.feature
Feature: Open Studio notifications
In order to track activity on content I am interested in
As a student
I want recive notifications about my posts and comments
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| teacher2 | Teacher | 1 | teacher1@asd.com |
| student1 | Student | 1 | student1@asd.com |
| student2 | Student | 2 | student2@asd.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| teacher2 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And the following open studio "instances" exist:
| course | name | description | grouping | groupmode | pinboard | idnumber | tutorroles |
| C1 | Demo Open Studio | Notifification description | GI1 | 1 | 99 | OS1 | editingteacher |
And all users have accepted the plagarism statement for "OS1" openstudio
Given I am on the "Demo Open Studio" "openstudio activity" page logged in as "student1"
And I follow "Add new content"
And I set the following fields to these values:
| id_visibility_3 | 1 |
| Title | Module post |
| Description | Module post |
And I press "Save"
And I follow "My Content"
And I follow "Add new content"
And I set the following fields to these values:
| id_visibility_3 | 1 |
| Title | Module post 1 |
| Description | Module post 1 |
And I press "Save"
13. 13
A bad example continued
Adapted from mod/openstudio/tests/behat/content_block_socical.feature
Scenario: Interactive emoticons in content block social
When I am on the "Demo Open Studio" "openstudio activity" page logged in as "teacher1"
And I wait until the page is ready
# The emoticons should be the gray icon when user doesn't react it.
Then "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_5']//span[contains(., '')]" "xpath_element" should exist
Then "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_5']//img[contains(@src, 'inspiration_grey_rgb_32px')]" "xpath_element" should
exist
Then "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_4']//span[contains(., '')]" "xpath_element" should exist
Then "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_4']//img[contains(@src, 'participation_grey_rgb_32px')]" "xpath_element" should
exist
Then "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_2']//span[contains(., '')]" "xpath_element" should exist
Then "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_2']//img[contains(@src, 'favourite_grey_rgb_32px')]" "xpath_element" should
exist
Then I click on "Module post 1" "link"
And I wait until the page is ready
And I click on "0 Favourites" "link"
And I click on "0 Smiles" "link"
And I click on "0 Inspired" "link"
And I wait until the page is ready
And I am on the "Demo Open Studio" "openstudio activity" page
# The emoticons should be the blue icon when user reacts it.
Then "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_5']//span[contains(., '1')]" "xpath_element" should exist
Then "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_5']//img[contains(@src, 'inspiration_rgb_32px')]" "xpath_element" should exist
Then "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_4']//span[contains(., '1')]" "xpath_element" should exist
Then "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_4']//img[contains(@src, 'participation_rgb_32px')]" "xpath_element" should exist
Then "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_2']//span[contains(., '1')]" "xpath_element" should exist
Then "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_2']//img[contains(@src, 'favourite_rgb_32px')]" "xpath_element" should exist
Then I am on the "Demo Open Studio" "openstudio activity" page logged in as "student1"
And I click on "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_5']//span[contains(., '1')]" "xpath_element"
And I click on "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_4']//span[contains(., '1')]" "xpath_element"
And I click on "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_2']//span[contains(., '1')]" "xpath_element"
Then I am on the "Demo Open Studio" "openstudio activity" page logged in as "teacher1"
And I click on "Module post 1" "link"
And I should see "2 Favourites"
And I should see "2 Smiles"
And I should see "2 Inspired"
15. 15
Irrelevant navigation
Adapted from mod/quiz/tests/behat/editing_add.feature in Moodle 3.2
# ...
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Quiz 1"
And I navigate to "Edit quiz" node in "Quiz administration“
# ...
Slow Fragile Irrelevant
16. 16
Setting things up using the UI
Adapted from mod/openstudio/tests/behat/content_block_socical.feature
Feature: Open Studio notifications
In order to track activity on content I am interested in
As a student
I want recive notifications about my posts and comments
Background:
# ...
Given I am on the "Demo Open Studio" "openstudio activity" page logged in as "student1"
And I follow "Add new content"
And I set the following fields to these values:
| id_visibility_3 | 1 |
| Title | Module post |
| Description | Module post |
And I press "Save"
And I follow "My Content"
And I follow "Add new content"
And I set the following fields to these values:
| id_visibility_3 | 1 |
| Title | Module post 1 |
| Description | Module post 1 |
And I press "Save“
# ...
Slow Fragile Irrelevant
17. 17
Identifying things on-screen using XPath or CSS
Adapted from question/format/xml/tests/behat/import_export.feature
Scenario: Interactive emoticons in content block social
# ...
# The emoticons should be the blue icon when user reacts it.
Then "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_5']//span[contains(., '1')]" "xpath_element" should exist
Then "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_5']//img[contains(@src, 'inspiration_rgb_32px')]" "xpath_element" should exist
Then "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_4']//span[contains(., '1')]" "xpath_element" should exist
Then "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_4']//img[contains(@src, 'participation_rgb_32px')]" "xpath_element" should exist
Then "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_2']//span[contains(., '1')]" "xpath_element" should exist
Then "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_2']//img[contains(@src, 'favourite_rgb_32px')]" "xpath_element" should exist
Then I am on the "Demo Open Studio" "openstudio activity" page logged in as "student1"
And I click on "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_5']//span[contains(., '1')]" "xpath_element"
And I click on "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_4']//span[contains(., '1')]" "xpath_element"
And I click on "//div[@class='openstudio-grid-item'][1]//span[@id='content_view_icon_2']//span[contains(., '1')]" "xpath_element"
Then I am on the "Demo Open Studio" "openstudio activity" page logged in as "teacher1"
# ...
Fragile Unclear
18. 18
Long rambling tests
question/type/pmatch/tests/behat/basic_test.feature
Scenario: Create, edit then preview a pattern match question.
When I am on the "Course 1" "core_question > course question bank" page logged in as teacher
# Create a new question.
And I add a "Pattern match" question filling the form with:
| Question name | My first pattern match question |
| Question text | Listen, translate and write |
| id_usecase | Yes, case must match |
| id_allowsubscript | Yes |
| id_allowsuperscript | Yes |
| id_forcelength | warn that answer is too long and invite respondee to shorten it |
| id_applydictionarycheck | Do not check spelling of student |
| id_sentencedividers | ?! |
| id_converttospace | ;: |
| id_synonymsdata_0_word | any |
| id_synonymsdata_0_synonyms | "testing|one|two|three|four" |
| Answer 1 | match (testing one two three four) |
| id_fraction_0 | 100% |
| id_feedback_0 | Well done! |
| id_otherfeedback | Sorry, no. |
| Hint 1 | Please try again. |
| Hint 2 | Use a calculator if necessary. |
Then I should see "My first pattern match question"
# Checking that the next new question form displays user preferences settings.
When I press "Create a new question ..."
And I set the field "item_qtype_pmatch" to "1"
And I click on "Add" "button" in the "Choose a question type to add" "dialogue"
Then the following fields match these values:
| id_usecase | Yes, case must match |
| id_allowsubscript | Yes |
| id_allowsuperscript | Yes |
| id_forcelength | warn that answer is too long and invite respondee to shorten it |
| id_applydictionarycheck | Do not check spelling of student |
| id_sentencedividers | ?! |
| id_converttospace | ;: |
And I press "Cancel"
# Preview it. Test correct and incorrect answers.
And I am on the "My first pattern match question" "core_question > preview" page
And I set the following fields to these values:
| How questions behave | Interactive with multiple tries |
| Marked out of | 3 |
| Marks | Show mark and max |
And I press "Start again with these options"
Then I should see "Listen, translate and write"
And the state of "Listen, translate and write" question is shown as "Tries remaining: 3"
When I set the field "Answer:" to "testing"
And I press "Check"
Then I should see "Sorry, no."
And I should see "Please try again."
When I press "Try again"
Then the state of "Listen, translate and write" question is shown as "Tries remaining: 2"
When I set the field "Answer:" to "testing one two three four"
And I press "Check"
Then I should see "Well done!"
Then the state of "Listen, translate and write" question is shown as "Correct"
# Backup the course and restore it.
When I log out
And I log in as "admin"
When I backup "Course 1" course using this options:
| Confirmation | Filename | test_backup.mbz |
When I restore "test_backup.mbz" backup into a new course using this options:
| Schema | Course name | Course 2 |
Then I should see "Course 2"
When I navigate to "Question bank" in current page administration
Then I should see "My first pattern match question"
# Edit the copy and verify the form field contents.
When I choose "Edit question" action for "My first pattern match question" in the question bank
Then the following fields match these values:
| Question name | My first pattern match question |
| Question text | Listen, translate and write |
| id_synonymsdata_0_word | any |
| id_synonymsdata_0_synonyms | "testing|one|two|three|four" |
| Answer 1 | match (testing one two three four) |
| id_fraction_0 | 100% |
| id_feedback_0 | Well done! |
| id_otherfeedback | Sorry, no. |
| Hint 1 | Please try again. |
| Hint 2 | Use a calculator if necessary. |
And I set the following fields to these values:
| Question name | Edited question name |
And I press "id_submitbutton"
Then I should see "Edited question name"
Huge time-waste if the failure is at the end
Good Scenarios each test one thing
- Then the failure message tells you what’s broken
Slow Fragile
21. 21
Organise and name things clearly
Naming things is hard
- but getting it right helps everyone – including future you!
Organised
22. 22
Use Given, When and Then correctly
Only test one thing per scenario
Remember the four-phase test pattern
local/monitor/tests/behat/local_monitor.feature
@ou @ou_vle @local @local_monitor
Feature: Check the monitor script, one of two that checks the server is working OK
In order to monitor the server system
As some back-end system component (supposing this script is still used, which we don't know)
I need to have the monitor script run
Scenario: Check monitor script
Given the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "activities" exist:
| activity | name | intro | course | idnumber |
| label | L1 | <a href="../local/monitor/index.php?display=1">MonLink</a> | C1 | label1 |
When I log in as "admin"
And I am on "Course 1" course homepage
And I follow "MonLink"
Then I should see "All tests completed successfully"
Clear
23. 23
Important Given steps
.
Given the following "..." exist:
“…” can be
- Standard entities like “user”, “course”, “activity”, “course enrolments”, …
- Full list in lib/behat/classes/behat_core_generator.php
- You can extend this for your plugin
Given the following config values are set as admin:
| showuseridentity | email,profile_field_oucu |
Fast Robust
Extensible
25. 25
Important When steps
When I am on the "Quiz 1" "mod_quiz > Grades report" page
When I am on the "Intro" "page activity" page logged in as student
When I follow "Edit profile"
When I press "Save changes"
When I set the field "Question text" to "Edited question text."
.
When I click on "Student" "link" in the "View as" "block"
When I set the following fields to these values:
| Question name | AV question |
| Type of recording | Customised audio/video |
Fast Clear Robust
Extensible
26. 26
Extending navigation
/**
* Convert page names to URLs for steps like 'When I am on the "[identifier]" "[page type]" page'.
*
* Recognised page names are:
* | pagetype | name meaning | description |
* | course question bank | Course name | The question bank for a course |
* | preview | Question name | The screen to preview a question |
*
* @param string $type identifies which type of page this is, e.g. 'Preview'.
* @param string $identifier identifies the particular page, e.g. 'My question'.
* @return moodle_url the corresponding URL.
* @throws Exception with a meaningful error message if the specified page cannot be found.
*/
protected function resolve_page_instance_url(string $type, string $identifier): moodle_url {
switch (strtolower($type)) {
case 'course question bank':
return new moodle_url('/question/edit.php',
['courseid' => $this->get_course_id($identifier)]);
case 'preview':
[$questionid, $otheridtype, $otherid] = $this->find_question_by_name($identifier);
return new moodle_url('/question/bank/previewquestion/preview.php',
['id' => $questionid, $otheridtype => $otherid]);
default:
throw new Exception('Unrecognised core_question page type "' . $type . '."');
}
}
Adapted from question/tests/behat/behat_core_question.php
When I am on the "Course 1" "core_question > course question bank" page
27. 27
Important Then steps
Then I should see "Embedded question progress for Course 1"
Then I should not see "Fill in the Blanks"
Then "Page 3" "link" should exist
Then "Equation editor" "button" should be visible
Then the field "Describe this image" matches value "Awesome!"
Then the following fields match these values:
Then "Student 1" row "Username" column of "generaltable" table should contain "student1“
Fast Clear Robust
28. 28
More Then steps
Then I should see "Frog" in the "activity" "core_course > Activity chooser tab"
Then I should see "Incorrect" in the "student2" "table_row"
Then "Delete" "button" should not exist in the "Confirm" "dialogue"
Then "Unread posts" "link" in the "Forum1" "list_item" should be visible
- various things like link, button, list item, dialogue, block, region, …
- full list in lib/behat/classes/partial_named_selector.php
- can be extened for your plugin.
- a kitten dies any time you use “css_element” or “xpath_element”
Clear Robust
Extensible
29. 29
Extending selectors
From course/tests/behat/behat_course.php
class behat_course extends behat_base {
public static function get_partial_named_selectors(): array {
return [
new behat_component_named_selector(
'Activity chooser screen', [
"%core_course/activityChooser%//*[@data-region=%locator%][contains(concat(' ', @class, ' '), ' carousel-item ')]"
]
),
new behat_component_named_selector(
'Activity chooser tab', [
"%core_course/activityChooser%//*[@data-region=%locator%][contains(concat(' ', @class, ' '), ' tab-pane ')]"
]
),
];
}
}
Clear Robust
… in the "activity" "core_course > Activity chooser tab"
30. 30
/**
* Put the specified questions on the specified pages of a given quiz.
*
* The first row should be column names:
* | question | page | maxmark |
*
* @param string $quizname the name of the quiz to add questions to.
* @param TableNode $data information about the questions to add.
*
* @Given quiz :quizname contains the following questions:
*/
public function quiz_contains_the_following_questions($quizname, TableNode $data) {
// ... Lots of complex code ...
}
Completely custom steps
A great option when appropriate
- Other extensibility makes it less necessary
- Ensure the step text clearly belongs to your plugin
Given quiz "Quiz 1" contains the following questions:
| question | page |
| TF1 | 1 |
Fast Robust
Example adapted from mod/quiz/tests/behat/behat_mod_quiz.php
32. 32
Summary
Remember everything you already know about testing
Learn by doing and looking at examples (and docs)
- but judge what you are looking at before you copy it
Remember the good practices and avoid the bad ones
Get support from other people
- https://moodledev.io/general/channels#developer-chat
There is lots you could learn, but you don’t need to learn it all at once
- you can get a long way with just some basic steps
- simple is good!