From: SourceIf you are too lazy to look at those long examples, you may wish to look at the following small example. This example will give you an intuitive understanding of test-driven development.At least let you know That test-driven development is a development technology, not a testing technology.A lot of people may have forgotten how to compile the Fibonacci series. It just shows you the power of tdd.
Test-driven development is inevitable.
The f
The following is the general distribution of TDD development types:
The key types here are:
Requestunitcontrol, requestunitmodel, iconfigdataprovider, and requestunitmodeltest
Requestunitcontrol: Interface Control
Requestunitmodel: encapsulates the business logic of requestunit.
Iconfigdataprovider: obtains the data required by the model.
Requestunitmodeltest: a unit test set used to ensure the correctness of the business logic encapsulated in
, the purpose is to let the students have never contacted Gtest to understand the basic use of gtest. There are many more advanced ways to use gtest, which we will discuss later. To summarize the contents of this article:1. Compiling gtest.lib files with vs2. Set the properties of the test project (the header file, lib file,/MT parameters (and the same parameters used when compiling gtest))3. Use the test macro to start a test case and set up checkpoints using the Expect_*,asser_* series.4. Init
I have talked a lot about using Mockery in PHP for test-driven Development (TDD) testing-driven development on the Internet, and some articles on PHP are also found in Baidu and Google, I don't seem to have seen several articles about Mock (disguised object) technology. I will write an article here.
First, let's take a look at the basic idea of Test-Driven Development: write test cases first (generally, this test case is an automated unit test case
person is "thinking" or "in a daze ". Sometimes I think that one of them is too tired to write code, and I will replace it with another one. Or one person is always writing code, and the other is always tutoring.TDD has a rhythm problem. A task is divided into red bars and green bars. The pair of two people focused on "red-green alternation. In this way, we can ensure that the steps of the two are consistent. Both parties know that we have achieved the first step. Generally, you can write test
I have heard of a very good web automation testing framework watin Based on the. NET platform over the past two days. I have downloaded and tried it for a while and it is really easy to use. Its basic functions are a bit like selenium, but not as powerful as Selenium. It does not have script recording and only supports IE6/7. Its basic functions include automatic operations on most HTML elements, multiple search methods, Ajax, frame/iframe, and pop-up boxes. Now we will use a simple example to s
Since mvvm and TDD are used, the two tools are essential:
1. mvvm light Toolkit
2. Silverlight unit testing framework
The corresponding WP7 version is available. Add the DLL to the project.
The following are some important points:
1. Create a new project weibo72. Add a test project weibo7.test
1) Add Microsoft. Silverlight. Testing Microsoft. visualstudio. qualitytools. unittesting. Silverlight to the project reference.2) Modify mainpa
Everyone is familiar with the test driver. I have read a Java book over the past two days and reviewed some basic concepts in TDD as follows:
Dummy
an object that is passed around but never used. typically used to fulfill the parameter list of A method.
stub
an object that always returns the same canned response. may also hold some dummy state.
fake
an actual working implement
These two days have heard a very good based. NET platform of the Web Automation test framework watin, download a trial, really good use. Its basic functions and selenium a bit like, but not as strong as selenium, no script recording, only support IE6/7 and so on. Its basic functions include automating most of the HTML elements, finding ways to support Ajax, supporting Frame/iframe, supporting pop-up boxes, and more. Now let's take a simple example to see how to use Watin for
TDD (test-driven development)-related test framework 1. XUnit: The corresponding test framework for each language 2. EasyMock: Analog interface or class behavior 3. DBUnit: Database Test 4. Spring-test: Provides database integration Test 5. Web-based test based on request (1) Spring-mock: Can mock browser requests, etc. (2) jsptest: Test JSP page 6. Web test based on Control (1) wickettester (2) Apache Shale 7. Apache Commons VFS: Virtual file system,
1. Choose a language for communication
We have encountered problems in the development of a seafarer management system, and the terminology of this field is difficult to translate. Even reluctantly translated, also feel Bundas, whether it is at
1) First case for an sample user:Public class MockHttpContext: HttpContextBase
{
Private readonly IPrincipal _ user = new GenericPrincipal (
New GenericIdentity ("username"), null/* roles */);
Public override IPrincipal User{Get{Return _
Test-driven development is an important practice in agile methods. It is generally considered to be the father of extreme programming.Kent BeckCreated 《Test-driven development by exampleThe book has been elaborated in detail. However, as many
Frank:
Hi everyone, I wonder if anyone can help me with this. (I am a newbie in this list. If my problem is inappropriate, please forgive me .)
In shortTest-firstHow should we handle enumeration variables?
Since we should not meetRed
Exception message: Unable to load one or more of the requested types. Retrieve the loaderexceptions property for more information.
Mathengine is a Silverlight form project,
Mathengine. app and mathengine. mainpage are default application classes and
Two days ago, I first saw "Product/market fit" in an interview with Dong Jing. Today, when I read "hacker and painter", the author PaulGraham also repeatedly stressed the importance of rapid market response, opposed to the step-by-step drag of
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.