with moodle google summer of code experience€¦ · protractor runs tests against your application...

37
the world’s open source learning platform Google Summer of Code Experience with Moodle

Upload: others

Post on 20-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform

Google Summer of Code Experience with Moodle

Page 2: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform

[email protected]

@SuuPuuN

@supun94

Hello

I am Supun

2

Software Engineering Undergraduate at Informatics Institute of Technology,

Sri Lanka (Affiliated with University of Westminster, UK)

Google Summer of Code 2016 Student at Moodle

Page 3: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform 3

What we’ll cover

Page 4: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform

▷ What is Google Summer of Code▷ How GSoC works▷ Why GSoC▷ My GSoC/Open source Experience▷ Why did I choose Moodle▷ GSoC Project▷ Demonstration▷ Protractor▷ Documentation▷ Completed Tasks▷ How to write testable code

4

Page 5: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform 5

What is Google Summer of Code

1.

Page 6: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform

Google Summer of Code (GSoC)

Google Summer of Code is a global program funded by Google to focus on bringing more student developers into open source software development

6

Page 7: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform 7

Page 8: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform 8

How GSoC works

2.

Page 9: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform

▷ Student▷ Mentor/s▷ Mentoring Organization▷ Google

9

Page 10: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform 10

201Organizations

72Countries

1318Students

Page 11: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform 11

Why GSoC

3.

Page 12: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform 12

● Learning and contributing to the Open Source World● Opportunities and Expertise

● Global Network● Stipend & Goodies● Recognition

Page 13: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform 13

My GSoC/Open source Experience

4.

Page 14: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform 14

Page 15: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform

▷ GSoC Student 2016 - Moodle▷ GSoC Student 2017 - Joomla▷ GSoC Mentor 2018 - Jenkins▷ Google Code-In Mentor 2017 – JBoss▷ Software Engineering Intern @ WSO2

15

Page 16: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform 16

Page 17: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform 17

Why did I choose Moodle

5.

Page 18: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform

▷ I have heard Moodle from the school days and it’s not something new for me.

▷ Good platform to practice cohesive learning and Moodle is the world’s open source learning platform.

▷ Nowadays the whole world has shifted to mobile applications and Moodle has already moved on.

▷ They use very latest technologies and it helps me to improve my skills

18

Page 19: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform 19

Page 20: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform 20

GSoC Project

6.

Page 21: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform

Add support to end-to-end testing in

the Moodle Mobile app

the world’s open source learning platform

21

Page 22: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform

Project mentor

Juan LeyvaMoodle Mobile team lead

22

Page 23: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform

• This project mainly involves with Moodle mobile app.

• Objective of this project is add more tests to the app( MOBILE-1179) and document the set-up process in the Moodle developers wiki.

• The basements for this project are done and have to complete only the remaining part.

Project Introduction

the world’s open source learning platform 23

Page 24: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform 24

Let’s see a demonstrationHow to write end-to-end testing

7.

Page 25: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform 25

Page 26: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform 26

Protractor end-to-end test framework for Angular

8.

Page 27: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform

▷ Protractor is an end-to-end test framework for AngularJS applications.

▷ Protractor runs tests against your application running in a real browser, interacting with it as a user would.

▷ Protractor also speeds testing as it avoids the need for a lot of “sleeps” and “waits” in your tests, as it optimizes sleep and wait times.

27

Page 28: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform the world’s open source learning platform 28

Page 29: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform 29

Documentationhttps://docs.moodle.org/dev/Moodle_Mobile_End_To_ End_Testing

7.

Page 30: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform

▷ I have been updated Moodle wiki page and added Blog post for the documentation of this project.

▷ In the implementation I created separate tests files for each tests scenarios. All the test files should be located under e2e folder in right component. And also tests files end with .spec.js○ Github profile: Supun94○ Github branch: gsoc-e2e

▷ Ex: If you want to make tests for course search, need to implement tests under course file (www/core/components/course/e2e/course.spec.js)

▷ Here is some brief description about what I have been covered during the GSOC coding period.

30

Page 31: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform 31

Completed Tasks

7.

Page 32: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform

▷ Course Searching Test

▷ Quiz Test▷ App settings Test▷ Course Assign Test▷ Course Book Test▷ Course Chat Test▷ Course Choice Test▷ Course Folder Test

32

▷ Course Forum Test▷ Course Glossary Test▷ Course Filtering▷ Course Participants

Test▷ Course Final Grade

Test▷ Course Contents

Test▷ Check that the

Forum Post was successfully created

Page 33: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform

▷ User can create Notes in a course Test

▷ User can see more options in participants section as a teacher Test

▷ User can see more options in course content section as a teacher Test

▷ User can see New staff induction test as a teacher

▷ User can see course final grade as a teacher

▷ Course Wiki Test

33

▷ Course Label Test▷ Course Resource Test▷ Course Survey Test▷ Calendar Event Test▷ Course Notifications Test▷ Course Completion Test▷ Course Files Test

Page 34: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform 34

Is your code testableHow to write testable code

8.

Page 36: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform 36

Any Questions ?You can find me at:

@SuuPuuN

@supun94

Thanks!

Page 37: with Moodle Google Summer of Code Experience€¦ · Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also

the world’s open source learning platform

Thank you the world’s open source learning platform

37