How to test a big JS application?

H

Helmut Giese

Hello out there,
I am new to JS but I am possibly facing a big and complex application
(if this sounds like crazy: The thread "Creating names of variables at
run-time" explains the background.)
I know that I will be in need of a good test framework and would like
to ask for advice.

What I would normally do is this:
Level 1) Create a basic set of functions, exercise them (automatically
via test sripts), verify their results and save those results as
further reference.
Level 2) Create more functions, create the necessary test scripts in
parallel, run all tests and verify, that the functions from level 1
still produce the same results.
Level 3 to level N) repeat
(In the dark old ages this was known as regression testing.)

Unfortunately I have absolutely no idea how to approach this (heck, I
don't even know how to save the result of a program run to a file -
you see, I'm a true JS newbie.).
Any advice will be greatly appreciated.
Best regards
Helmut Giese
 
J

Joost Diepenmaat

Helmut Giese said:
Hello out there,
I am new to JS but I am possibly facing a big and complex application
(if this sounds like crazy: The thread "Creating names of variables at
run-time" explains the background.)
I know that I will be in need of a good test framework and would like
to ask for advice.

What I would normally do is this:
Level 1) Create a basic set of functions, exercise them (automatically
via test sripts), verify their results and save those results as
further reference.
Level 2) Create more functions, create the necessary test scripts in
parallel, run all tests and verify, that the functions from level 1
still produce the same results.
Level 3 to level N) repeat
(In the dark old ages this was known as regression testing.)

If you can get it to install and run, selenium is probably your best
bet, assuming you're going to be running stuff in a multitude of
browsers, and you also want to test the "visual" output (or at least,
the resulting DOM objects) of your scripts.

It's also scriptable via a fairly large set of other languages, which
may come in handy.

http://selenium.openqa.org/

disclaimer: I've only played with it for a bit, so I can't vouch for
it. If anyone has other suggestions, I'm interested.
 
H

Helmut Giese

If you can get it to install and run, selenium is probably your best
bet, assuming you're going to be running stuff in a multitude of
browsers, and you also want to test the "visual" output (or at least,
the resulting DOM objects) of your scripts.

It's also scriptable via a fairly large set of other languages, which
may come in handy.

http://selenium.openqa.org/

disclaimer: I've only played with it for a bit, so I can't vouch for
it. If anyone has other suggestions, I'm interested.
Hi Joost,
thanks for the info.
I realize now, that I omitted a central point. I will post an addendum
as this will hopefully clarify the requirements.
Best regards
Helmut Giese
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,771
Messages
2,569,587
Members
45,099
Latest member
AmbrosePri
Top