Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I went looking on the Google for a simple JavaScript object or other bit of JS code that can deliver a list of strings that are interesting for testing. I thought there would be a billion hits, but I couldn't find one. If I'm just doing my search wrong, please give me the link(s) as an answer. If I don't get a good answer, I'll turn this question into a community wiki page and we can construct one together.

By 'interesting', I mean the list contains strings known to cause problems; things like the empty string, a string with unicode characters, a string with closing delimiters of various kinds - like quotes, close-braces, greater-than, etc. I understand that an exact and comprehensive list would depend on the specific code under test - I just want a general set of good ones to get started with.

share|improve this question
Hey Bruce! I don't know of any either, and couldn't find any with a quick search. I wonder if there is just a list of interesting test strings agnostic of platform or language? Or maybe a fuzzing tool that generates all of the interesting strings plus some randomly generated ones using certain criteria? – Sam Woods Dec 2 '11 at 19:52
I certainly would have guessed that all those things are out there, but a while spent fruitlessly searching Google and StackOverflow seems to say they are not. – Bruce Dec 2 '11 at 22:11

Does it have to be a JavaScript object?

Do these help?

share|improve this answer
The tests-for-strings.html one looks pretty good, thanks. I asked for a JavaScript object because I was hoping for something pretty plug-and-play, to save myself some typing. – Bruce Dec 8 '11 at 19:47

I've used this previously although its lacking the more frequently erroneous values, maybe we could build something similiar though ?

it does have the option of getting them back in plain text or formatted which is handy :)

share|improve this answer
Given enough volume, random is probably better than just guessing, but I'd still like to have some list of "known problematic" strings. The character set offered on that page also seems quite limited: no unicode, no punctuation. – Bruce Dec 2 '11 at 22:17
I did say its lacking some of the potentially more problematic strings, though it really depends on how you are partitioning the input domain for testing. It would be easy enough to write something similar that added more characters, although if you just wanted a list then a user contributed dictionary would be better as people could contribute towards it. – Luke Dec 2 '11 at 23:24

Your Answer


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.