-
15. Re: seam TestNG does not work
suzhen Oct 29, 2008 6:02 PM (in response to suzhen)Hi Matt,
I change the persistence.xml and components.xml. Not use comp/env/jdbc/OAMProjectDB. Now TestNG is running well. When load page, there is no exception anymore, but When I load the page, alway get a popup window with message "Redirection limit for this URL exceeded. Unable to load the requested page. This may be caused by cookies thank are blocked.".
Here is my persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="OAMProjectDatabase">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/OAMProjectDatasource</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.show_sql" value="false"/>
</properties>
</persistence-unit>
</persistence>
Here is my components.xml
<?xml version="1.0" encoding="UTF-8"?>
<components xmlns="http://jboss.com/products/seam/components"
xmlns:core="http://jboss.com/products/seam/core"
xmlns:persistence="http://jboss.com/products/seam/persistence"
xmlns:security="http://jboss.com/products/seam/security"
xmlns:drools="http://jboss.com/products/seam/drools"
xmlns:async="http://jboss.com/products/seam/async"
xmlns:web="http://jboss.com/products/seam/web"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd
http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd
http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd
http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
http://jboss.com/products/seam/async http://jboss.com/products/seam/async-2.0.xsd
http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.0.xsd
http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.0.xsd">
<core:manager conversation-timeout="120000"
concurrent-request-timeout="500"
conversation-id-parameter="cid"/>
<security:identity authenticate-method="#{authenticator.authenticate}"/>
</components>
Thanks, -
16. Re: seam TestNG does not work
matt.nirgue Oct 29, 2008 6:12 PM (in response to suzhen)OK, so now your TestNG is working... which is a good thing right?
I don't get what you want from me now though... -
17. Re: seam TestNG does not work
suzhen Oct 29, 2008 6:17 PM (in response to suzhen)Thanks Matt.
Now I can not load page.
I alway get a popup window with message
Redirection limit for this URL exceeded. Unable to load the requested page. This may be caused by cookies thank are blocked.
.I just feel some wrong on my components.xml, but I do not know what is wrong.
-
18. Re: seam TestNG does not work
matt.nirgue Oct 29, 2008 6:41 PM (in response to suzhen)I don't understand which page you want to load...
you're using Embedded JBoss for your tests right?
By the way, I don't get how you can use your entity manager now since there's no trace of any in your components.xml...
-
19. Re: seam TestNG does not work
suzhen Oct 29, 2008 7:31 PM (in response to suzhen)Hi Matt,
My application does not use database, I just do not know how disable seam project to use database.
I can not run the seam project under tomcat, when load xhtml page from tomcat, I get redirect error.
My testNG is used to test my seam project, which is running under tomcat.
Thanks,
Suzhen
-
20. Re: seam TestNG does not work
matt.nirgue Oct 30, 2008 9:38 AM (in response to suzhen)So you're telling me that you can't load the page once you've launched your tests is that right?
-
-
22. Re: seam TestNG does not work
matt.nirgue Oct 30, 2008 4:31 PM (in response to suzhen)I don't get how you can launch your entire application through your tests... if this is how you do it, I think that your application would run while your tests run then stop as soon as they're over... Of course, I may be wrong but I don't see how this would be possible...
Anyway, since your first problem is now solved, I suggest you open a new thread cause I don't know how to help you with this...
If you open a new thread, try to explain exhaustively what you're trying to do, what does work, what doesn't,...
-
23. Re: seam TestNG does not work
matt.nirgue Oct 30, 2008 5:19 PM (in response to suzhen)If you're using TestNG just to run some tests then I don't think you would be able (and/or have the time) to load the page before your tests are completed... TestNG is just used to run integration tests or run simple unit tests... So when they're over, the application is not running anymore...
I'm not sure about any of this but this is just what I think...