Top Banner
Methods to test an e- learning Web application. gerardo.morales@it- sudparis.eu
34
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Methods to test an e-learning Web application.

Methods to test an e-learning Web application.

[email protected]

Page 2: Methods to test an e-learning Web application.

Problematic and Motivations

LMS are rapidly increasing its complexity Learning standards Security policies Suggestions of users

2Jtel Summer school 09

Terchova, Slovakia 2 June 2009

Page 3: Methods to test an e-learning Web application.

Problematic and Motivations

The real problem of an Open Source LMS It is a hard task to assure the stability

because Daily changes (new features) Hundred of different developers

Different thinking Working separately

3Jtel Summer school 09

Terchova, Slovakia 2 June 2009

Page 4: Methods to test an e-learning Web application.

Conformance testing

4

Model

Implementation inJava

Implementation inC++

Conforms?

standard ISO 9646

Jtel Summer school 09Terchova, Slovakia 2 June 2009

Page 5: Methods to test an e-learning Web application.

5

Regression testing

File a.tcl (version 0.1)

File b.tcl (version 0.1)

File c.tcl (version 0.1)

File d.tcl (version 0.1)

Execute conformancetests

File c.tcl (version 0.2)

Feature 1Feature 2Feature 3Feature 4

Jtel Summer school 09Terchova, Slovakia 2 June 2009

Page 6: Methods to test an e-learning Web application.

Regression testing

File a.tcl (version 0.1)

File b.tcl (version 0.1)

File c.tcl (version 0.1)

File d.tcl (version 0.1)

Feature 1Feature 2Feature 3Feature 4

Execute conformancetests

File c.tcl (version 0.2)

6Jtel Summer school 09

Terchova, Slovakia 2 June 2009

Feature 5 ?

Page 7: Methods to test an e-learning Web application.

7

Regression testing

Feature 1Feature 2Feature 3Feature 4

Version 0.1

Feature 1Feature 2Feature 3Feature 4Feature 5

Version 0.2

?

Regression bugs detected in Features 2 and 3

Jtel Summer school 09Terchova, Slovakia 2 June 2009

Page 8: Methods to test an e-learning Web application.

Automatic Model Based Testing

Verdict

System

?

Jtel Summer school 09Terchova, Slovakia 2 June 2009

Page 9: Methods to test an e-learning Web application.

Automatic Model Based Testing

Automatic testing

Verdict

System

Jtel Summer school 09Terchova, Slovakia 2 June 2009

Page 10: Methods to test an e-learning Web application.

Automatic Model Based Testing

Automatic testing

Verdict

Test cases

System

??

Jtel Summer school 09Terchova, Slovakia 2 June 2009

Page 11: Methods to test an e-learning Web application.

Automatic Model Based Testing

Automatic testing

Verdict

Test cases

FORMALModel of system

System

Jtel Summer school 09Terchova, Slovakia 2 June 2009

Page 12: Methods to test an e-learning Web application.

Automatic Model Based Testing

Automatic testing

Verdict

Test cases

FORMALModel of system

System

????

Jtel Summer school 09Terchova, Slovakia 2 June 2009

Model

Page 13: Methods to test an e-learning Web application.

Model

An abstraction of the real thing We abstract away all the irrelevant details We abstract away all the confusing details We make a Simplification of a real system

Visibility of a system to be understood evaluated and criticized

13Jtel Summer school 09

Terchova, Slovakia 2 June 2009

Page 14: Methods to test an e-learning Web application.

Model

Jtel Summer school 09Terchova, Slovakia 2 June 2009

Finit States Machine

Page 15: Methods to test an e-learning Web application.

Ready to model?

Prolearn Summer school 09Slovakia 2 June 2009

F: (usr,pass)

L:register

Page 16: Methods to test an e-learning Web application.

Signup model

Jtel Summer school 09Terchova, Slovakia 2 June 2009

q1 Our Login Page

Page 17: Methods to test an e-learning Web application.

Signup model

Jtel Summer school 09Terchova, Slovakia 2 June 2009

q1

login(usr,pass) signup

Usr_id=pass_id

Message: « Unknown

User, pass »

q1

q2

q3

Page 18: Methods to test an e-learning Web application.

Signup model

Jtel Summer school 09Terchova, Slovakia 2 June 2009

q1

login(usr,pass) signup

Usr_id=pass_id

Message: « Unknown

User, pass »

q1

q2

q3

http://mymoodleinstance.com

http://mymoodleinstance.com/signup

http://mymoodleinstance.com/home

Page 19: Methods to test an e-learning Web application.

Signup model

Jtel Summer school 09Terchova, Slovakia 2 June 2009

q1

login(usr,pass) signup

Usr_id=pass_id

q1q2

q3

Task 1

Build a model of…

Welcome

User & Password

Fill this form

Page 20: Methods to test an e-learning Web application.

Jtel Summer school 09Terchova, Slovakia 2 June 2009

User

Password

OK

SignoutWelcome Harry Potter

My Frequently asked Questions

My Faq

1 Q: Where is Terchova?A: In Slovakia2 Q Where is Gerardo?A: In Terchova

Add an Q&A

Signout

Howards School LMS

Add an Q&A

Question:

Answer:

OK

Signout

Page 21: Methods to test an e-learning Web application.

Signup model

Jtel Summer school 09Terchova, Slovakia 2 June 2009

q1

login(usr,pass) signup

Usr_id=pass_id

Message: « Unknown

User, pass »

q1

q2

q3

q1

q1q2 q3

Page 22: Methods to test an e-learning Web application.

Signup model

Jtel Summer school 09Terchova, Slovakia 2 June 2009

q1

login(usr,pass) signup

Usr_id=pass_id

Message: « Unknown

User, pass »

q1

q2

q3

q1

q1q2 q3

q1q2 q3

q5q7

q8

Page 23: Methods to test an e-learning Web application.

PRESENTATION OF METHODOLOGIES

23Jtel Summer school 09

Terchova, Slovakia 2 June 2009

Page 24: Methods to test an e-learning Web application.

Simulator of the model

24Jtel Summer school 09

Terchova, Slovakia 2 June 2009

s0

s1 s2 s3

s4 s0 s5 s6 s7

TP: Action=input w State= s5 ck1= d

x/ya/b

c/d

a/dd/e w/y

a/bc/d f/g

Page 25: Methods to test an e-learning Web application.

Simulation of the model

25Jtel Summer school 09

Terchova, Slovakia 2 June 2009

s0

s1 s2 s3

s4 s0 s5 s6 s7

TP: Action=input w State= s5 ck1= d

x/ya/b

c/d

a/dd/e w/y

a/bc/d f/g

Trace1: [s0, x, y,s1]2: [s1, w,y,s5]

Inputsx,w

Expected outputsy,y

Expected final states5

Page 26: Methods to test an e-learning Web application.

Output of the test generator

26Jtel Summer school 09

Terchova, Slovakia 2 June 2009

?login(user1, password1) / ! Text (Welcome)?frequently_asked_questions() / ! Text (My Faq)

.

.

.

.

?login(user1,user2) Twt:: form find « login »Twt:: field fill « user1 »Twt:: fiend find « password »Twt:: field fill « password1 »Twt:: form submit

Translation to tclwebtest

Page 27: Methods to test an e-learning Web application.

Conformance test case (Automatic Model Based testing)

27Jtel Summer school 09

Terchova, Slovakia 2 June 2009

SystemSpecs

FormalModel

(Functional+Security)

AbstractTest Suites

TestScripts

TestExecution

TraceReport

Ed

itor

Test Generator Test Transformer

Execu

tor

Analyzer

1. M

odelin

g

2. Generation 3. Translation

5. Analysis

4. E

xecu

tion

TestPurposes

Page 28: Methods to test an e-learning Web application.

USE CASE

28Jtel Summer school 09

Terchova, Slovakia 2 June 2009

Page 29: Methods to test an e-learning Web application.

Test Preamble Test

29

Conformance test case

Jtel Summer school 09Terchova, Slovakia 2 June 2009

Page 30: Methods to test an e-learning Web application.

In the example of FAQ edition If the page we got after the action is the corret one

if {[string match "*admin/one-faq*" $response_url] } { if { [catch {tclwebtest::form find ~n "faq_add_edit"} errmsg] || [catch\\ {tclwebtest::field find ~v "$faq_new_name"} errmsg] } { aa_error "faq::twt::edit_one failed $errmsg : Dont't Edit a Faq" } else { aa_log "Faq Edited“}

30

Verdict assignation

Jtel Summer school 09Terchova, Slovakia 2 June 2009

Page 31: Methods to test an e-learning Web application.

In the example of FAQ edition If the page we where redirect is the correct one If the new name of the faq is founded in the faq

page

if {[string match "*admin/one-faq*" $response_url] } { if { [catch {tclwebtest::form find ~n "faq_add_edit"} errmsg] || [catch\\ {tclwebtest::field find ~v "$faq_new_name"} errmsg] } { aa_error "faq::twt::edit_one failed $errmsg : Dont't Edit a Faq" } else { aa_log "Faq Edited“}

31

Verdict assignation

Jtel Summer school 09Terchova, Slovakia 2 June 2009

Page 32: Methods to test an e-learning Web application.

32

Acs-automated testing

Jtel Summer school 09Terchova, Slovakia 2 June 2009

Page 33: Methods to test an e-learning Web application.

Conformance test case

Extract the semantic of the LMS Generating a static trace while interacting

with the Web application

33Jtel Summer school 09

Terchova, Slovakia 2 June 2009

Page 34: Methods to test an e-learning Web application.

Conformance test case

Extract the semantic of dotLRN Generating a static trace while interacting

with the Web application

34Jtel Summer school 09

Terchova, Slovakia 2 June 2009