Test Driven Development, Unit Testing
Question: let me first explain what I'm aiming for with this question:

What kind of dev I am? I'm the guy who thinks about the problem, writes the
code and then tests it by myself. I'm developing web-apps mainly but there are
also projects which are UI based too (RCP/Swing apps). I run my app and click
here, test this... You probably know this "style".

Well I'm a guy who tries to improve himself with every line/project and I want
my code/apps to be tested pragmatically. I write in code - I want test in
code.

So I started for some of my classes/functions to use unit tests (junit 4).
This works for backend stuff where no UI is involved - tbh: I find it hard to
write the most of tests. If we're building a webapp there are probably
interactions with the session or something. I guess you get the point.

What I'm looking for are some resources probably with examples. Any good book
advice would be welcome too. Don't get me wrong - I don't want only stuff for
logic testing, I'm interested in ways to test my UI.

Maybe this is an important part too: I developing in Java (85% of the time)
and PHP/Python (the rest)

Regards


Answer: You can use to [Selenium](http://seleniumhq.org/) for complete front end
testing under any mainstream testing framework (eg: JUnit). Then stick to just
using a JVM alone for back end code, which is easy enough. You should be
covered in this regard. With Selenium you are writing an end-to-end test as
opposed to an atomic unit test on each aspect. That is a trade off to using
the complete front end to test in.

