Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
381 views
in Technique[技术] by (71.8m points)

testing - What test methods do you use for developing websites?

There are a lot of testing methods out there i.e. blackbox, graybox, unit, functional, regression etc.

Obviously, a project cannot take on all testing methods. So I asked this question to gain an idea of what test methods to use and why should I use them. You can answer in the following format:

Test Method - what you use it on

e.g.

  1. Unit Testing - I use it for ...(blah, blah)
  2. Regression Testing - I use it for ...(blah, blah)

I was asked to engage into TDD and of course I had to research testing methods. But there is a whole plethora of them and I don't know what to use (because they all sound useful).

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

1. Unit Testing is used by developers to ensure unit code he wrote is correct. This is usually white box testing as well as some level of black box testing.

2. Regression Testing is a functional testing used by testers to ensure that new changes in system has not broken any of existing functionality

3. Functional testing is testing conducted on a complete, integrated system to evaluate the system's compliance with its specified requirements. Functionality testing falls within the scope of black box testing, and as such, should require no knowledge of the inner design of the code or logic

.

This Test-driven development and Feature Driven Development wiki articles will be of great help for you.

For TDD you need to follow following process:

  1. Document feature (or use case) that you need to implement or enhance in your application that currently does not exists.
  2. Write set of functional test cases that can ensure above feature (from step 1) works. You may need to write multiple test cases for above feature to test all different possible work flows.
  3. Write code to implement above feature (from step 1).
  4. Test this code using test cases you had written earlier (in step 2). The actual
    testing can be manual but I would recommend to create automated tests if possible.
  5. If all test cases pass, you are good to go. If not, you need to update code (go back to step 3) so as to make the test case pass.

TDD is to ensure that functional test cases which were written before you coded should work and does not matter how code was implemented.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...