CSC/ECE 517 Fall 2015 E1590 Integration testing for Team creation: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
(Created page with "Intro == Assignment == === Description === This project aims at developing an email based anonymous session between author and a reviewer so that reviewers can ask questions to...")
 
No edit summary
Line 1: Line 1:
Intro
== '''Purpose''' ==
This project is to create integration tests for the instructor interface of Expertiza. The UI procedures need to be tested are:
* Log in
* Create a course
* View scores for an assignment
* View review scores (“review report”)
* View author-feedback scores
* Create an assignment
** 2 rounds of review
** Has no topics / has topics
** Staggered-deadline assignments


== Assignment ==


=== Description ===
== '''Background''' ==
This project aims at developing an email based anonymous session between author and a reviewer so that reviewers can ask questions to the authors for any doubts related to the assignments during peer reviewing.


=== Purpose ===
=== RSpec ===
During reviews, many times reviewers will be having questions about the submitted material and if it's a blocker there is no way that the reviewer can progress further with the review. As a result, reviewers will end up submitting the empty or incomplete review.
Rspec <ref>[https://en.wikipedia.org/wiki/RSpec RSpec Wiki Page]</ref> is a Behavior Driven Development (BDD) framework for Ruby. It is composed of 4 main parts <ref>[http://rspec.info/ RSpec Official Website]</ref>:
; rspec-core
: The spec runner, providing a rich command line program, flexible and customizable reporting, and an API to organize your code examples.  


=== Scope ===
An example of running rspec file in terminal: <code>rspec spec/model_spec.rb </code>
This project is limited to an email based conversation for asking questions and answers. The reviewers would ask questions related to assignment submission doubts to which authors can respond. All this would be taken care as email responses using a link provided in the email. This project does not cater to any live interactive session with spontaneous back-to-back questions and responses.


Following tasks would be incorporated in the project:
; rspec-expectations
* Provide a ‘TextArea’ input field on review forms, where any reviewer can type in their questions.
: Provides a readable API to express expected outcomes of a code example.
* Create a new button ‘Ask for Quick Help’ on the review forms.
* An email would be send to the author with the link where he can respond to the questions asked by the reviewers for their submitted work.
* Reviewers would be notified by an email when authors respond to the the questions.


== Design ==
; rspec-mocks
: Test double framework, providing multiple types of fake objects to allow you to tightly control the environment in which your specs run.


=== Discussion of Resolution ===
; rspec-rails
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
: Supports using RSpec to test Ruby on Rails applications in place of Rails' built-in test framework.


=== Mock-Ups ===
=== Capybara ===
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
Capybara is a web-based automation test tool that simulates a real user to follow the scenarios of user stories.<ref>[https://github.com/jnicklas/capybara Capybara on GitHub]</ref> It could interact with app to receive pages, parse the HTML and submit forms as a user would.<ref>[https://www.youtube.com/watch?v=p7ZcZNuZ0aw Introducing cucumber & capybara on YouTube]</ref> Used with RSpec and Ruby on Rails (version 1.9 or later), capybara makes it easier to write integration tests. <ref>[http://techiferous.com/2010/04/using-capybara-in-rails-3/ Using Capybara in Rails 3]</ref> It is used on the top of an underlying web-based driver and offers a user-friendly DSL (Domain Specific Language) to describe actions executed by the underlying web driver. Such as <code>rack::test</code>, <code>selenium-webdriver</code> and <code>capybara-webkit</code>.<ref>[http://www.sitepoint.com/basics-capybara-improving-tests/ The Basics of Capybara and Improving Your Tests]</ref>


=== Design Patterns ===
In this project, we use capybara with rspec by adding the following line:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
<code> require 'capybara/rspec' </code>
Then put capybara specs in <code>spec/features</code>.
=== Integration test ===
Integration test is a software testing definition that we combine modules then test them as one group. It is an important application testing way. It is always adapted after unit testing, we need to combine different units to test the functionalities and verify that the aggregated group could deliver its output properly. The purpose of integration test is to verify the functionality of interface between interacted parts, also we can know performance of the subsystems. The integration testing has two types, big bang top down and bottom up.


=== Use Cases ===
* '''Big Bang'''
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum


=== Proposed Tests ===
In this type, since all the application is combined with all major usage modules. So we test them under usage model testing, which means we can simulate the users' acts under testing environment. When doing this, we can test if all the expected components is got when we actually do the same way under production environment. It is an effective way to test the functionalities and got better coverage since we are creating the realistic scenarios. It will make sure the application can have proper output when a user does the same input.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum


* '''Top down and Bottom up'''


== Implementation ==
Top down and bottom up is another type of integration testing. For top down, we test the top integrated module firstly and test the ranch of it again and again, then we can test all the related modules finally. For Bottom up way, we test the most basic module at first and check the module that containing this basic module. The advantage of it is that we can find the bug easier because we will not miss any branch that we use. However, it is time consuming in this way.<ref>[https://en.wikipedia.org/wiki/Integration_testing/ Integration testing on Wikipedia]</ref>


Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum


== Suggestions for Future Improvements ==
== '''Testing''' ==


* This can be extended to a live interactive author-reviewer anonymous chat session inside the Expertiza reviews window.
Based on the project requirements, the testing can be divided into the following parts:
* A purging script can be developed which will clear all the interaction records every semester.


==References==
T1. Ensure an instructor is able to login to the system.
{{reflist}}
 
T2. Ensure an instuctor is able to create a course.
 
T3. Ensure that the score of a certain assignment can be viewed.
 
T4. Ensure to view the score of a review.
 
T5. Ensure to view the score of an author feedback.
 
T6. Ensure to create an assignment which has two rounds of review, has a topic or does not has a topic, and has a staggered-deadline.
 
 
=References=
<references></references>

Revision as of 17:17, 6 November 2015

Purpose

This project is to create integration tests for the instructor interface of Expertiza. The UI procedures need to be tested are:

  • Log in
  • Create a course
  • View scores for an assignment
  • View review scores (“review report”)
  • View author-feedback scores
  • Create an assignment
    • 2 rounds of review
    • Has no topics / has topics
    • Staggered-deadline assignments


Background

RSpec

Rspec <ref>RSpec Wiki Page</ref> is a Behavior Driven Development (BDD) framework for Ruby. It is composed of 4 main parts <ref>RSpec Official Website</ref>:

rspec-core
The spec runner, providing a rich command line program, flexible and customizable reporting, and an API to organize your code examples.

An example of running rspec file in terminal: rspec spec/model_spec.rb

rspec-expectations
Provides a readable API to express expected outcomes of a code example.
rspec-mocks
Test double framework, providing multiple types of fake objects to allow you to tightly control the environment in which your specs run.
rspec-rails
Supports using RSpec to test Ruby on Rails applications in place of Rails' built-in test framework.

Capybara

Capybara is a web-based automation test tool that simulates a real user to follow the scenarios of user stories.<ref>Capybara on GitHub</ref> It could interact with app to receive pages, parse the HTML and submit forms as a user would.<ref>Introducing cucumber & capybara on YouTube</ref> Used with RSpec and Ruby on Rails (version 1.9 or later), capybara makes it easier to write integration tests. <ref>Using Capybara in Rails 3</ref> It is used on the top of an underlying web-based driver and offers a user-friendly DSL (Domain Specific Language) to describe actions executed by the underlying web driver. Such as rack::test, selenium-webdriver and capybara-webkit.<ref>The Basics of Capybara and Improving Your Tests</ref>

In this project, we use capybara with rspec by adding the following line: require 'capybara/rspec' Then put capybara specs in spec/features.

Integration test

Integration test is a software testing definition that we combine modules then test them as one group. It is an important application testing way. It is always adapted after unit testing, we need to combine different units to test the functionalities and verify that the aggregated group could deliver its output properly. The purpose of integration test is to verify the functionality of interface between interacted parts, also we can know performance of the subsystems. The integration testing has two types, big bang top down and bottom up.

  • Big Bang

In this type, since all the application is combined with all major usage modules. So we test them under usage model testing, which means we can simulate the users' acts under testing environment. When doing this, we can test if all the expected components is got when we actually do the same way under production environment. It is an effective way to test the functionalities and got better coverage since we are creating the realistic scenarios. It will make sure the application can have proper output when a user does the same input.

  • Top down and Bottom up

Top down and bottom up is another type of integration testing. For top down, we test the top integrated module firstly and test the ranch of it again and again, then we can test all the related modules finally. For Bottom up way, we test the most basic module at first and check the module that containing this basic module. The advantage of it is that we can find the bug easier because we will not miss any branch that we use. However, it is time consuming in this way.<ref>Integration testing on Wikipedia</ref>


Testing

Based on the project requirements, the testing can be divided into the following parts:

T1. Ensure an instructor is able to login to the system.

T2. Ensure an instuctor is able to create a course.

T3. Ensure that the score of a certain assignment can be viewed.

T4. Ensure to view the score of a review.

T5. Ensure to view the score of an author feedback.

T6. Ensure to create an assignment which has two rounds of review, has a topic or does not has a topic, and has a staggered-deadline.


References

<references></references>