Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

What does 'automating a use case 'means and how does the tools that automate helps with that? whats makes automation good to do and does it holds any significance for web developement.

share|improve this question
    
What context are you seeing the phrase used? –  Jay Elston Apr 9 '12 at 13:31
    
for a customer based web design i have to recomend a open-source tool that automates a use case and i have to justify my choice. –  LivingThing Apr 9 '12 at 14:02
add comment

1 Answer 1

up vote 2 down vote accepted

Suppose you have a form where users can make an account. Would you prefer to manually fill in 20 text boxes, tens of times with all kinds of input that may give wrong results? Or would you rather have an automatic test do that for you in a matter of seconds?

A use case by all means is some action or procedure that your application should support, for example "register". A use case is something that one or more "actors" can do, people who would be users of your application for example "site visitor".

An automated test for the use case "register" that a "site visitor" can do, would be to create various inputs for the different data, preferrably a mixture of valid and invalid ones, then create a test class that tries to use your program with these inputs, test whether the invalid ones are correctly detected and the valid ones are accepted by using assert statements, then view the test results.

Writing the test can take a lot of time, but the big advantage is that it should still work after you made changes to your application. If it doesn't, that means you have introduced a bug into your application.

The most interesting datatypes to test for are things like numbers and dates, where you should test for interval edges, if any apply.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.