CSC/ECE 517 Fall 2011/ch4 4e cl: Difference between revisions
No edit summary |
|||
Line 37: | Line 37: | ||
==The Low-Down on Fixtures== | ==The Low-Down on Fixtures== | ||
===What is a Fixture=== | ===What is a Fixture=== | ||
Test fixture refers to the fixed state used as a baseline for running tests in software testing. The purpose of a test fixture is to ensure that there is a well known and fixed environment in which tests are run so that results are repeatable.<ref>http://en.wikipedia.org/wiki/Test_fixture</ref> | Test fixture refers to the fixed state used as a baseline for running tests in software testing. The purpose of a test fixture is to ensure that there is a well known and fixed environment in which tests are run so that results are repeatable.<ref>http://en.wikipedia.org/wiki/Test_fixture</ref>For good tests, you’ll need to give some thought to setting up test data. In Rails, you can handle this by defining and customizing fixtures. | ||
=Category= | =Category= |
Revision as of 02:37, 20 October 2011
CSC/ECE 517 Fall 2010/ch1 4e cl
Introduction
In this Wiki, we introduce the testing in Ruby Rails. We give brief introduction of different kinds of tests and give the procedure about each kind.
What is Software Test
Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test.[1] Software testing can also provide an objective, independent view of the software to allow the business to appreciate and understand the risks of software implementation. Test techniques include, but are not limited to, the process of executing a program or application with the intent of finding software bugs (errors or other defects). Software testing can be stated as the process of validating and verifying that a software program/application/product: meets the requirements that guided its design and development; works as expected; and can be implemented with the same characteristics. Software testing, depending on the testing method employed, can be implemented at any time in the development process. However, most of the test effort occurs after the requirements have been defined and the coding process has been completed. As such, the methodology of the test is governed by the software development methodology adopted.<ref>http://en.wikipedia.org/wiki/Software_testing</ref>
What is Rails
Why need Software Test for Rails Application
Ruby on Rails, often shortened to Rails or RoR, is an open source web application framework for the Ruby programming language. Rails makes it super easy to write your tests. It starts by producing skeleton test code in the background while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application’s response without having to test it through your browser.
What support provided by Rails
Basic Introduction
Three Environments
production development test
Set Up
There is a folder named "test" which is generate when create the Rail projects. To list contents of this folder $ ls -F test/ We can see: fixtures/ functional/ integration/ test_helper.rb unit/
The Low-Down on Fixtures
What is a Fixture
Test fixture refers to the fixed state used as a baseline for running tests in software testing. The purpose of a test fixture is to ensure that there is a well known and fixed environment in which tests are run so that results are repeatable.<ref>http://en.wikipedia.org/wiki/Test_fixture</ref>For good tests, you’ll need to give some thought to setting up test data. In Rails, you can handle this by defining and customizing fixtures.
Category
Unit Testing
Functional Testing
Integration Testing
Conclusion
References
<references/>