query management system-iv review

Download Query Management system-Iv review

If you can't read please download the document

Upload: logeshprabu

Post on 25-Jun-2015

321 views

Category:

Education


0 download

TRANSCRIPT

  • 1. Query Management System Name:Logeshprabu.S Class:MCA Review :IV Date:11.04.11 Guide:Mr.V.Senthilkumar

2. Testing Methods in Rails! Testing Models: A Model testing is also known as Unit testing.A test of individual programs or modules in order to ensure that there are no analysis or programming errors is known as Model( unit ) testing. An unit testing provides three basic functionalities: 1.A way to define basic pass/fail tests. 2.A say to gather like tests together and run them as a group 3.Tools for running single tests or whole groups of tests. 3. Testing Controllers: Controller testing is also known as functional testing.Functions are tested by feeding them input and examining the output, and internal program structure is rarely considered. Ittests the following type of functionalities of the controllers: Is the response redirected as expected ?Is the expected template rendered?Is the routing as expectedDoes the response contain the expected tags? 4. Summary of Unit Testing case Test case id Description Expected Results Actual Results Status 1 Enter the email_id as Blank It should raise error It is not accepting Pass 2 Enter email_id with varchar(20) It should accept to proceed It is not accept more then 20 Fail 3 Enter email_id with special characters It should accept to proceed It is not acceptingPass 4 Enter a email_id with numerical It should accept toproceed It is not acceptingFail 5. Summary of Functional Testing case Test case id Description Expected Results Actual Results Status 1 Get index It should get index page/ if is not get It is accepting/ display page errorPass 2 Get new It should diplay create page It is accepting Pass 3 Get new/submit It should create record/not create Its accepting/not accepting Pass/Fail 4 Get show It should display created record Its accepting Pass 5 Get destroy I should delete selected record Its accepting Pass 6. Rails Test Commands$rake test- Test all unit tests and functional tests (andintegration tests, if they exist). $rake test:functionals- Run all functional tests. $rake test:units- Run all unit tests. $rake test:integration- Run all integration tests. $rake test:plugins- Run all testin./vendor/plugins/**/test. $rake test:recent- Run tests for models andcontrollers that have been modified in the last 10minutes. 7.