WAR Tests
Sometimes some test fails upon undeployment, either because of EMBJOPR-109 or presumably because of OOME.
TODOs, ideas
Add jboss-structure.xml to archives, and try to override the locations:
<?xml version="1.0" encoding="UTF-8"?> <!-- Fix for EMBJOPR-21: ignore the EJB3 related metadata --> <structure> <context> <path name=""/> <metaDataPath> <path name="WEB-INF"/> </metaDataPath> <classpath> <path name="WEB-INF/classes"/> <path name="WEB-INF/lib" suffixes=".jar"/> </classpath> </context> </structure>
Multiple WARs in EAR.
(18:11:47) smcgowan: just wanted to discuss a few test assertions for Apps here (18:11:50) smcgowan: do you have a minute? (18:11:54) ozizka: Sure (18:12:07) smcgowan: 1) scoped classloading (18:12:30) smcgowan: can we deploy two .ears that contain the same classes in each (18:12:38) smcgowan: also scoping within an .EAR (18:12:55) smcgowan: as we discussed some of this is related more to AS than just jopr (18:13:03) smcgowan: but would like to know that JOPR can handle the deployments (18:13:24) smcgowan: we can build the test archives in AS testsuite and add test classes there at some point later (18:13:30) ozizka: Ok, let's put it in the wiki page and I'll start implementing (18:14:23) ozizka: What should it do then? Each ear will have it's own classloader? (18:14:31) smcgowan: no I will put on wiki, i promise (18:14:42) ozizka: And what about the Configuration tab properties... Do you know how should I test them? (18:14:47) ozizka: Ok :) (18:14:53) smcgowan: https://jira.jboss.org/jira/browse/JBAS-6600 - check this out 18:15 (18:15:04) smcgowan: the forums are down, but there is a forum post on it too (18:15:16) smcgowan: for scoped classloading within the .ear you need to user the loader-repository (18:15:25) smcgowan: it is unclear how this will be defined with JOPR (18:15:42) smcgowan: but looks like the jboss-app.xml needs to provide it so EMBJOPR may not have to care (18:16:48) smcgowan: http://www.jboss.org/community/wiki/ClassLoadingConfiguration (18:17:12) ozizka: I think I've read exactly this, (18:17:14) smcgowan: now, the loader-repository is a somewhat out-dated element, but it is still used as far as I know (18:17:26) smcgowan: another test scenario to consider: (18:17:27) ozizka: but lot of the text is obsolete and it didn't work as described... (18:17:38) ozizka: Don't remember exactly, though (18:17:40) smcgowan: deploy ejb.jar with bad ejb.xml, assert error (18:17:51) smcgowan: redeploy (upload) fixed ejb.jar (18:18:07) smcgowan: now this is blocked due to the EJB not being supported but would like a test case for this too (18:18:13) smcgowan: i know you have it for WAR (18:18:40) smcgowan: an .EAR containing nested EJBs (18:18:46) smcgowan: i'll add the detai to the wiki on this (18:18:57) smcgowan: but the .EAR contains client with two ejb jars (18:19:19) smcgowan: client has ejb-ref (using ejblink) to one of the EJBs in one of the jars (18:19:26) smcgowan: defined as ejb.jar#BEANNAME (18:19:46) smcgowan: from that bean a ref to a bean in the second jar is looked up using ejb-local-ref (18:19:50) smcgowan: etc., etc. 18:20 (18:20:11) smcgowan: and then my combination of archives with persistence units in the (18:20:26) smcgowan: in the EAR/lib directory which makes it available to all resources in the same .EAR (18:20:35) smcgowan: in the WEB-INF/classes directory of a standalone WAR (18:20:42) smcgowan: in the WEB-INF/lib directory of a standalone war (18:21:01) smcgowan: at the root of an ejb.jar both packaged in an .EAR and standalone EJB (18:21:12) smcgowan: where the latter is not testable yet without EJB support (18:21:30) smcgowan: for the connection factory tests, I will have a RAR inside an EAR (18:21:39) smcgowan: as well as a .RAR being hot deployed (18:23:25) smcgowan: deploy a client jar with an ejb-ref (18:23:37) smcgowan: deploy the .EAR or EJB as a separate archive (18:24:44) smcgowan: so, let me put in wiki in assertion format but wanted to let you know what I was thinking of 18:30 (18:34:49) ozizka: All right, please give it some shape :) 19:35 (19:37:17) smcgowan: and we really should rebuild the EarExtDependencies.ear archive as it has TCK classses in it and was intended to be used for example purposes (19:37:33) smcgowan: TCK is not yet an OpenSource license (19:37:40) ozizka-brb: Ah (19:37:43) ozizka-brb: ok (19:37:50) smcgowan: it's just binary classes so not a huge deal but a @TODO
testBasicWarDeployment
- Navigate to WAR Applications.
- Add a new resource.
- Verify the resource was successfully deployed.
- Undeploy the archive.
testBadWarRedeploy
Tries to deploy a invalid WAR (with invalid descriptor) and checks that EmbJopr rejects this deployment.
testNavigationToWar
Various ways to navigate to a WAR application:
Nav tree, apps listing, WARs listing.
testWarSummaryTab
Tests the values shown in the Summary tab of WAR.
Was failing because of: EMBJOPR-110
testWarConfigurationTab
Changes WAR configuration, and checks whether the changes were saved.
Was failing because some of the values were read-only. EMBJOPR-96
Now all properties seem to be editable.
testWarConfigurationTabCancel
Changes WAR configuration, and verifies that the changes were NOT saved.
testWarRedeployment
Redeploys WAR, using WAR's Content tab upload form.
Was failing because of: EMBJOPR-109
testWarDeployUndeployDeploy
Deploys the WAR, undeploys it and deploys again.
All these actions are done using EmbJopr.
Was failing because of EMBJOPR-125
testWarDeployUndeployDeployRetryOnErrors
Deploys the WAR, undeploys it and deploys again.
All these actions are done using EmbJopr.
DISABLEDtestUnzippedWarReportedAsExploded
Deploys exploded WAR and checks whether it is reported as exploded.
DISABLED - Badly written test, to be fixed. TODO: Hot-deploy
testWarMetricsTab
Checks WAR metrics tab.
Was failing because of: EMBJOPR-110 (missing / at the beginning of the path)
testWarMetricsTabRefreshButton
Changes WAR configuration, and checks whether the changes were saved.
Was failing because some of the values are read-only. EMBJOPR-96
testDeployUnpackedWar
Deploys an exploded WAR application.
Was failing when undeploying, see the TODO in the comment.
testStopAndStartWar
Stops and starts the WAR using buttons in the Control tab, and checks whether it's really stopped and started by sending HTTP requests.
testRestartWar
Restarts the WAR using button in the Control tab, and checks whether it's really restarted by checking whether JSP variable was reset.
testDeployWarWithIncorrectExtension
Deploys a WAR with bad farchive extension (.zip) and checks whether EmbJopr reports deployment failure.
testWarAppearsInNavTree
Deploys a WAR and checks whether it appears in the Nav Tree.
TBD
testWarConfigurationTabEffects
Sets values in the Configuration tab and tests whether these values have some effect on the environment / behavior of the WAR.
All values are related to classloading.
TBD
assertion: Deploy a standalone war with persistence unit in
WEB-INF/classes directory.
assertion: Deploy standalone war with persistence unit in
WEB-INF/lib directory.
Comments