CSC/ECE 517 Fall 2015 E1581 Integration testing for student interface: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 118: Line 118:
# Click ‘Other’s work’
# Click ‘Other’s work’
# Check that a feedback exists.
# Check that a feedback exists.
==External links==
[http://rspec.info/ Official website]

Revision as of 02:03, 17 November 2015

Create integration tests for the student interface using capybara and rspec. Integration testing is the phase in software testing in which individual software modules are combined and tested as a group. It occurs after unit testing and before validation testing. Integration testing takes as its input modules that have been unit tested, groups them in larger aggregates, applies tests defined in an integration test plan to those aggregates, and delivers as its output the integrated system ready for system testing.

Design

To properly execute the integration tests we will write the test cases to mimic a user operating the system. We will create strong integration test cases to help ensure the outcome of application's student interface remains the same regardless of changes to its inner functionality. In an attempt to keep our tests DRY we will put common code in a support directory.

Testing tools

RSpec is a behavior-driven development (BDD) framework for the Ruby (programming language)|Ruby programming language, inspired by JBehave.<ref name="origin">Ed Gibbs, JBehave and RSpec History (Blog entry)</ref> It contains its own mocking framework that is fully integrated into the framework based upon JMock.

Capybara is a web-based automation framework used for creating functional tests which can simulate how users would interact with your application.

Test Plan

There are 8 features to be tested:

  1. Log in
  2. Add someone to a team Should not be possible if you exceed the max # of team members)
  3. Select a topic(if the assignment has topics)
  4. Select a submission to review For assignments with or without topics
  5. Bring up a review form
  6. Fill out & submit a review form
  7. View your scores
  8. Respond to a review (“author feedback”)

Log in

we create a file called ‘student_signin_spec.rb’.  We define a method named login; and because we need this method in every later  feature test we will put this in the support directory.

  • Scenario 1: Log in with ‘invalid combination of username and password’

When we sign in with correct name and password; we expect that there should be content ‘Invalid username/password’ appear in the new page.

  • Scenario 2: Log in with ‘valid combination of username and password’

When we sign in with correct name and password; we expect that there should be content ‘User: (username)’ appear in the new page.

Add someone to a team

  • Scenario 1: Team member exceed max amount
  1. Sign in
  2. Click link assignment
  3. Click link  “Your team”
  4. Fill in the box with invitation receiver name and click button send invitation. 

After doing these steps, we expect fault would happen. We could capture contents ‘Your team already has max members.’ 

  • Scenario 2 : Team member  don't exceed max amount
  1. Sign in 
  2. Click link certain assignment
  3. Click link  “Your team” 
  4. Fill in the text area with invitation receiver name
  5. Click send invitation button
  6. Sign out.
  7. Sign in as receiver
  8. Click link assignment
  9. Click link  “Your team”
  10. Click  button ‘accept’
  11. Sign out.
  12. Sign in as the sender 
  13. Click link certain assignment
  14. Click link  “Your team”

On this page, we expect the receiver's name will appear.

Select a topic

Note: assignment has topics

We need the following steps:

  1. sign in. 
  2. click the link for assignment 
  3. click link  “signup sheet”
  4. click the sign up for the remaining topic we want, or join the waiting list if the topic is not available. 
  5. sign out 

Select a submission to review

  1. sign in.  
  2. click the link for the assignment we want to review.
  3. click the link for “other’s work”
  4. click the link for the submission we want to review
  5. fill in all the required forms, and then click “save” to save our review. 
  6. sign out 

Bring up a review form

Repeated for an assignment without a topic and an assignment with a topic

  1. Execute the ‘Request a new submission’ button action  
  2. Check that a review form has successfully been created

Fill out and submit a review form

  • Scenario 1:

Note: Do this for an assignment without a topic and an assignment with a topic.

  1. Open a review form
  2. Fill out all text fields
  3. Select all scores from dropdowns
  4. Submit form
  5. Check for successful save
  • Scenario 2:
  1. Open a review form
  2. Fill out some text fields
  3. Select some scores
  4. Save form
  5. Reopen form
  6. Fill out remaining fields and scores
  7. Save form
  8. Check for successful save

View your scores

  • Scenario 1: No Scores available yet
  1. Sign in
  2. Click link for Assignment
  3. Click ‘Your scores’
  4. Check that nothing exists yet
  5. Check for dashes.
  • Scenario 2: Scores available.
  1. Sign in
  2. Click link for Assignment
  3. Click ‘Your scores’
  4. Check that displayed scores match scores independently calculated from all reviews.

Respond to a review (“author feedback”)

  1. Sign in as author
  2. Click link for Assignment
  3. Click ‘Your scores’
  4. Click ‘show reviews’
  5. Click ‘Give feedback’
  6. Fill out Feedback form
  7. Click Save Feedback
  8. Sign out
  9. Sign in as reviewer
  10. Click link for Assignment
  11. Click ‘Other’s work’
  12. Check that a feedback exists.