Questions tagged [jsfunit]

JSFUnit is a test framework for Java ServerFaces

JSFUnit is a unit test framework for Java Server Faces which uses a simplified API for unit testing and integration testing of JSF applications.

31 questions
16
votes
6 answers

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…
Zack Marrapese
  • 12,072
  • 9
  • 51
  • 69
10
votes
2 answers

Is there a way to get the generated HTML as a String from a UIComponent object?

I have a UIComponent object. I would like to get the HTML code generated by this component at runtime so I can analyze it. Is there a way to achieve this? I am trying to use JsfUnit to create automated tests. I can get ahold of the UICompoment…
Felipe Reis
  • 479
  • 8
  • 24
6
votes
1 answer

Maven with automated testing using TestNG, JSFUnit 2 and Arquillian

im currently trying to make a JSFUnit-Test with Arquillian and TestNG, but the JSFServerSession and JSFClientSession-object is NULL. Is there a working EXAMPLE for having JSFUnit and TestNG? Or is something else wrong here? My testing-class: package…
FibreFoX
  • 2,858
  • 1
  • 19
  • 41
5
votes
3 answers

JSF/Java Beans/Richfaces testing solution (JSFUnit, JUnit, etc)

I'm currently looking into approaches for creating automated unit tests for any new code created in our web based application. We are running JSF 2.0, Richfaces 3.3 and using JRE1.6. I'd be interested in hearing opinions on what people have used and…
Thomas Buckley
  • 5,836
  • 19
  • 62
  • 110
5
votes
1 answer

Where can I find JSFUnit real-life example?

I'm trying to use JSFUnit framework, but can't understand how to allocate projects/files. How many projects/sub-projects should I have and whether it is possible to have just ONE project, as it normally happens with JUnit and similar frameworks.…
yegor256
  • 102,010
  • 123
  • 446
  • 597
5
votes
2 answers

How to test JSF application without deploying it in to Server?

Hello I've been googling a lot about this. I want to test my JSf application without deploying it in to Server, so basically i want perform mock test like test. I've used JSFUnit before. If its possible with JSFUnit itself, HOW to DO THAT? Is there…
Kishor Prakash
  • 8,011
  • 12
  • 61
  • 92
3
votes
1 answer

How to inject managed bean into FacesContext?

How can I replace an @ApplicationScoped managed bean with my own copy of it in FacesContext? All I have is an instance of FacesContext (I'm inside JSFUnit).
yegor256
  • 102,010
  • 123
  • 446
  • 597
3
votes
1 answer

Does JSFUnit test all aspects of a web application?

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…
ystark
  • 565
  • 9
  • 18
2
votes
0 answers

Error: This project cannot be added because it does not produce a jar file using an Ant script

I created a test project using JSFUnit 1.3 in Netbeans 7.3. I want to test the classes and pages of another project so I added it by right-clicking, properties, libraries, add project. I selected the project and click OK but I get this error. "This…
2
votes
0 answers

JsfUnit without JBoss in spring web app - maven dependency setup

I can't find an easy JSFUnit setup for my pom anywhere. What repository do I use and which dependencies? We have a running web app with JSF and Spring. Can't be that hard to get JSFUnit into the mix..?! Also we want to run the tests from Eclipse (I…
Pete
  • 10,720
  • 25
  • 94
  • 139
1
vote
1 answer

JSFUnit without Maven and JBoss AS

I would like to use JSFUnit for testing our web app. But we are using weblogic server and build process doesn't use maven. All of the examples use maven to run the tests. Is there other way to run JSFUnit tests without maven and JBoss ? Any link or…
nobody
  • 1,909
  • 5
  • 31
  • 45
1
vote
1 answer

(JSFUnit) visit many url's in same session

I am beginner in JSFUnit and related technologies. I was wondering: is it possible to change the url without creating a new JSFSession object? I.e. I would like to simulate the situation where the user types in a new address in his/her address…
Panayiotis Karabassis
  • 2,278
  • 3
  • 25
  • 40
1
vote
1 answer

JSFUnit issue - EJB not getting injected into servlet being tested

In my application I have an EntryServlet which loads default data and sets up the security based on the logged in user id. This servlet is using EJB's through dependency injection. It works fine when I execute it as a normal web application but when…
kiransri
  • 25
  • 1
  • 4
1
vote
1 answer

Error while using JSFUnit/HtmlUnit/CSSParser

We've just recently converted our project to using Maven for builds and dependency management, and after the conversion I'm getting the following exception while trying to run any JSFUnit tests in my project. Exception…
Brian Feaver
  • 155
  • 8
1
vote
1 answer

Arquillian - Not Matching any defined Container for WebLogic

I am trying to setup arquillian with Weblogic 12c. I am not using Maven which is part of the difficulty. I am using Ant. I keep getting the following errors: Could not read active container configuration: null Which was caused…
mpaulse
  • 87
  • 1
  • 11
1
2 3