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

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 5: Line 5:


== Testing tools ==
== Testing tools ==
'''capybara''' (''Hydrochoerus hydrochaeris'') is a large rodent of the genus ''Hydrochoerus'' of which the only other extant member is lesser capybara (''Hydrochoerus isthmius'').  Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website. The capybara is the largest rodent in the world. Close relatives are guinea pig s and Rock cavy|rock cavies, and it is more distantly related to the Common agouti|agouti, chinchilla s, and the coypu. Native to South America, the capybara inhabits savannas and dense forests and lives near bodies of water. It is a highly social species and can be found in groups as large as 100 individuals, but usually lives in groups of 10–20 individuals. The capybara is not a threatened species and is hunted for its meat, Hide (skin)|hide and also for a grease from its thick fatty skin which is used in the pharmaceutical trade.
'''capybara''' (''Hydrochoerus hydrochaeris'') is a large rodent of the genus ''Hydrochoerus'' of which the only other extant member is lesser capybara (''Hydrochoerus isthmius'').  Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website. It is a highly social species and can be found in groups as large as 100 individuals, but usually lives in groups of 10–20 individuals. The capybara is not a threatened species and is hunted for its meat, Hide (skin)|hide and also for a grease from its thick fatty skin which is used in the pharmaceutical trade.


'''RSpec''' is a behavior-driven development (BDD) framework for the Ruby (programming language)|Ruby programming language, inspired by JBehave. It contains its own mocking framework that is fully integrated into the framework based upon JMock.  The framework can be considered a domain-specific language (DSL) and resembles a natural language specification.
'''RSpec''' is a behavior-driven development (BDD) framework for the Ruby (programming language)|Ruby programming language, inspired by JBehave. It contains its own mocking framework that is fully integrated into the framework based upon JMock.  The framework can be considered a domain-specific language (DSL) and resembles a natural language specification.
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]
* [http://relishapp.com/rspec RSpec-2]

Revision as of 21:39, 13 November 2015

Create integration tests for the student interface using capybara and rspec.  

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

capybara (Hydrochoerus hydrochaeris) is a large rodent of the genus Hydrochoerus of which the only other extant member is lesser capybara (Hydrochoerus isthmius). Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website. It is a highly social species and can be found in groups as large as 100 individuals, but usually lives in groups of 10–20 individuals. The capybara is not a threatened species and is hunted for its meat, Hide (skin)|hide and also for a grease from its thick fatty skin which is used in the pharmaceutical trade.

RSpec is a behavior-driven development (BDD) framework for the Ruby (programming language)|Ruby programming language, inspired by JBehave. It contains its own mocking framework that is fully integrated into the framework based upon JMock. The framework can be considered a domain-specific language (DSL) and resembles a natural language specification.

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.

External links