3

I'm a testing noob and I need to test a JSF application. So I only just started exploring JSFUnit (read: I've googled it and StackOverflow-ed it), which as I understand uses/extends JUnit, HTMLUnit, HTTPUnit and other units that I have no idea about.

  • The thing is, the app uses Hibernate and what I want to know is whether or not I can use JSFUnit to create comprehensive tests that encompass model, view and controller, not to mention all that the HTTPUnit supposedly does?

  • Also, if I'm using Primefaces Dialog Framework so that my dialogs are not in the same page that opens said dialog, would I be able to test this approach? Or would it be better, in terms of testing, if my dialog was on the same page?

I hope my questions make sense. I promise they made sense in my head. Any help in this regard would be highly appreciated.

ystark
  • 565
  • 9
  • 18

1 Answers1

0

It seems that you require something more complex than pure unit tests.

Take a look at Selenium framework, as it simulates user interaction through a real recorded use case, and is easy to work with.

NikF
  • 56
  • 1
  • 4
  • Thanks for answering. I have actually looked into Selenium, but the thing is, when you are using JSF for your application, wouldn't it make more sense to use JSFUnit? Besides, I've been reading up on it and have found that Selenium is a tool for black box testing the client side and I need to holistically test the overall application (MVC). JSFUnit seems like a good way to go, as it encompasses all the aforementioned -units. – ystark Jan 23 '14 at 05:24
  • 1
    I have used Selenium in my projects simply because it does not rely on any technology it tests and uses web browser engine, thus simulating real life scenario. I would prefer specific JSF tests for testing specific JSF components if they are being developed, but in a real project you eventually end up with a mix of technologies on the GUI side. And the end user does not care about the technology, only functionality :) Selenium covers that. You may end up with using both - JSFUnit for specific components, Selenium for functional/integration testing. – NikF Jan 23 '14 at 08:20
  • Thanks again, NikF, but I'm trying to figure out the kind of testing JSFUnit specifically can be potentially used for. – ystark Jan 25 '14 at 19:21