aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes Unit tests VS functional tests Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Unit tests VS functional tests" Watch "Unit tests VS functional tests" New topic
Author

Unit tests VS functional tests

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
I glanced over the table of contents and it seems like you missed functional testing [or I missed it]

Creating tests to make sure that function A returns foo and that a date is a date. That is great when you are making sure validators work, that basic functions work, but that is only a small fraction of testing with the browser.

The real world problems come with how does the interface work in browser X, Y, Z. When I click on a button, do I get the correct x and Y coordinates to position my element? Most developers end up doing this testing manually which is a waste of time.

Automating these tests is where the benefit of testing comes from and I do not see any mentions of Selenium or other frameworks like that.

Have you used these frameworks and reason you did not cover them?

Eric
Christian Johansen
author
Ranch Hand

Joined: Oct 03, 2010
Posts: 46
Good question, Eric!

Functional testing is not entirely missing, but you're right in that it is not afforded its own chapter or the like. I felt that tools like Selenium felt outside the scope of the book. Selenium can be helpful in creating acceptance tests, but really my experience with it is not so great. Tests are easily too tightly coupled to implementation details in the UI, and when I've used it I've felt that maintaining the Selenium tests is a non-trivial task (especially while under initial development).

The book does however provide some insight in writing functional tests to assure that two or more modules work together in tandem. The practical part of the book develops a fully functional chat client (and server), all with TDD and JavaScript. So I think you should be able to find some answers you are seeking in there.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Unit tests VS functional tests
 
Similar Threads
For Mr. Cohen: Testing Java vs. testing .NET
Better Automated Testing Tool
Inner classes
Date inside iterator
Ways to box an int