tags:

views:

61

answers:

3

Hello guys,

I am new to testing so I am trying to test some random things that I found on the Internet. These are the test case that I thought for testing these things. Any help to assist me is very much appreciated.

1) Testing a text box.

Test cases:
Unit tests:
Passing alphabets from [a-z], [A-Z]
digits [0-9] , special symbols
test special characters specific to a language like \n etc

Stress tests:
To add a string as long as possible

Any other test cases are possible ? Do I need to test multiple text boxes too?

+2  A: 

Depending on your language, you might try passing null instead of a string. You also want to pass Unicode strings with a bunch of weird characters.

gnuvince
+1  A: 

Along with all the functional type testing you mentioned, also consider testing for SQL Injection attacks. Try entering actual commands into the text box.

http://en.wikipedia.org/wiki/SQL_injection

Classic examples include entering

' or '1'='1

' or '1'='1';/*'

Which could yield a statement such as

SELECT * FROM users WHERE name = '' OR '1'='1';

Edward Leno
+2  A: 

For general input testing:

  • Test the upper bounds of your input: (max, max+1, max-1)
  • Test the lower bounds of your input: (min, min-1, min+1)
  • Test the mid point (max+min/2)
  • Test uncommon characters: !@#$%^&*()-=+_;':"\|[]{},./<>?` (<-- see: these chars break the StackOverflow HTML code parser )
  • Test unicode characters
  • Test long input strings
  • Test empty / null input

Try these strings and see if your program crashes:

"%n"
"%x%x%x%n"

If you're using printf() the unsafe way it will crash.

Brock Woolf
+1 Good list, also try entering 0, 00, 001, ...
Edward Leno