Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSF unit testing

I'm trying to find a practical unit testing framework for JSF.

I know about JSFUnit, but this is very impractical to me. I need to include about 10 JARs to my project, and jump through many other hoops just to get it running.

I realize that -- due to the need to simulate a platform and a client -- unit testing web applications is difficult. But is there a better way?

like image 870
Zack Marrapese Avatar asked Jun 09 '09 17:06

Zack Marrapese


People also ask

How do you test threads?

To test multi-thread functionality, let the multiple instances of the application or program to be tested be active at the same time. Run the multi-thread program on different hardware. Thread testing is a form of session testing for which sessions are formed of threads.

Are junit tests thread safe?

Test thread safety You can use junit. extensions. ActiveTest to run a test case in a different thread. However, TestSuite assumes that a test case is complete when it returns from run() ; with junit.


1 Answers

Have you thought about doing integration testing with Selenium or another tool? Selenium allows you to record and run tests directly in the browser. You can also run tests in multiple browsers and on multiple platforms with Selenium Remote Control.

Writing unit tests is good, but it might provide more to create some functional integration tests rather than unit-testing the presentation layer code.

like image 181
Paul Morie Avatar answered Oct 12 '22 13:10

Paul Morie