CSC/ECE 517 Spring 2018/E1823 Write integration tests for users controller.rb

From Expertiza_Wiki
Jump to navigation Jump to search

This wiki page is a description of E1813 final project for Spring 2018, CSC/ECE 517.

Project Statement

Introduction

users_controller.rb is a file under app/controllers that manages different kinds of methods related to users. This project is to write integration tests for users_controller.rb by using rspec, so our goal is to create a file named users_controller_spec.rb under spec/controllers folder and write integration tests to make the path coverage of users_controller.rb more than 90% and achieve the highest possible branch coverage.

All methods used in this file that can render or redirect to one or more user-related views will be thoroughly tested.(16 in total) We do not need to test private or protected methods directly because these methods should be tested when testing other public methods in the same file.

Files Involved

Newly-created file:

spec/users_controller_spec.rb

Tested file:

app/controllers/users_controller.rb

Related view files:

app/views/users/edit.html.erb

app/views/users/keys.html.erb

app/views/users/list.html.erb

app/views/users/list_pending_requested.erb

app/views/users/new.html.erb

app/views/users/request_new.html.erb

app/views/users/show.html.erb

Team Members

Students who collaborated to work on this problem statement are :

1. Harish Pullagurla ( hpullag@ncsu.edu )

2. Kalyan Ghosh (kghosh@ncsu.edu)

3. Sandeep Rajendran(srajend@ncsu.edu)

Test Plan

Functionality of the Controller

Table

Methods

Testing Conditions

References