Internal QA info: http://intranet.corp.redhat.com/ic/intranet/TestingEmbeddedConsoleWithAS.html
JIRA issue: https://jira.jboss.org/jira/browse/JBQA-1938
Changelog: http://fisheye.jboss.org/changelog/EMBJOPR/
Hudson job: http://hudson.qa.jboss.com/hudson/job/embjopr-jsfunit/
Embedded Jopr project JIRA: https://jira.jboss.org/jira/browse/EMBJOPR
Hudson job: http://hudson.qa.jboss.com/hudson/job/embjopr/
We're testing with (versions [and reasons for that version to be chosen]):
EmbJopr: 1.1.1-SNAPSHOT (? Shelly will correct.)
JBoss AS 4: jboss-eap-4.3.0_CP03
JBoss AS 5: jboss-5.1.0-Beta1 (Unreleased)
JDK: SUN 1.5.0 - latest update (currently 17)
JSFUnit: 1.1.0.GA-SNAPSHOT
The last step includes launching JBoss AS in the JBOSS_HOME directory using the Maven Cargo plugin. Do not deploy the resulting war manually on that server, otherwise Cargo will behave quite weirdly (error parsing ServletRedirector.jsfunit, 404 Not found etc). If getting exceptions like this, make sure there's not the war deployed accidentally (in my case, it happened when I invoked non-standard maven goal; thanks to Farah Juma for pointing this out).
See also: JSFUnitWithMaven<br />
Running tests on Hudson: (TBD)
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<profiles>
<profile>
<id>jboss4.2</id>
<properties>
<JBOSS_HOME>/home/ondra/work/JOPRembedded/jboss-eap-4.3/jboss-as</JBOSS_HOME>
<JAVA_HOME>/home/ondra/sw/java/jdk/jdk1.5.0_17</JAVA_HOME>
</properties>
</profile>
<profile>
<id>jboss5x</id>
<properties>
<JBOSS_HOME>/home/ondra/work/JOPRembedded/jboss-5.0.0.GA</JBOSS_HOME>
<JAVA_HOME>/home/ondra/sw/java/jdk/jdk1.5.0_17</JAVA_HOME>
</properties>
</profile>
</profiles>
</settings>
mvn -Pjboss5x -Dtest=org.jboss.jopr.jsfunit.as5.DatasourceTest
In fact, test property takes a mask as it's value, so you can use asterisk to filter a group of tests:
mvn -Pjboss5x -Dtest=Datasource*Test
See http://maven.apache.org/plugins/maven-surefire-plugin/examples/single-test.html.
If you need to run single method, there's no (known) way to do it.
The tests are designed to cover both AS 4 (written using EAP 4.3.0) and AS 5 using the same code base, and covering the differences by overriding base classes.
org.jboss.jopr.jsfunit
org.jboss.jopr.jsfunit.as4
org.jboss.jopr.jsfunit.as5
The org.jboss.jopr.jsfunit
package contains the base class EmbjoprTestCase
with supporting methods which deal with common tasks of EmbJopr manipulation.
Other classes in this package, like DatasourceTestBase
, inherit from the EmbjoprTestCase
class. Generally, they follow the naming pattern <EmbJoprCompomentName>TestBase
. These sub-classes contain test methods "stubs". They should provide at least general test abstraction, but usually they will also perform most of the test, as far as this code would be the same for AS 4 and AS 5.
The differences between tests for AS 4 and AS 5 are coded in subclasses of the *TestBase
classes in the as4 and as5 packages. In case there's no difference between behavior of AS 4 and AS 5, the sub-class is not needed to override corresponding method; but, for clarity, it's better to override and explicitly call super.testSomething()
method.
as#.*Test
class, it can be removed, or replaced with trivial override:
@Override protected void testSomething() { super.testSomething(); }
as#
package. Then, carpenter will also override it in his/her as# package.
UnsupportedOperationException
. if( isEap4() ){ ... } else { ... }
, but the drawback would be that we will have tests for two AS versions. What if future AS versions will be different again? But for trivial cases like client.click( isEap4() ? "Continue" : "Save" )
I thing this is ok and saves us some complexity. abstract
testMethod(), leave whole test code in Lumberer's package, and create his/her own implementation.
See JBoss Jira JBQA-1938.
test subject | test method | AS 4 notes | AS 5 notes |
---|---|---|---|
testCreateDatasource | |||
Negative tests | |||
testCreateDatasourceMissingRequiredValues | |||
testCreateDatasourcePropertyOutOfRange | |||
testCreateDatasourceInvalidPropertyType | |||
testCreateDatasourcePropertyNotAllowed | |||
testCreateDatasourceDuplicateJNDIName | |||
Delete tests | |||
testDeleteLocalTXDatasource | |||
testDeleteNoTXDatasource | |||
testDeleteXADatasource | |||
Metrics tests | |||
testMetricsAfterDatasourceCreation | |||
testMetricsAfterInitialDBConnection | |||
testMetricsAfterMultipleDBConnections | |||
test subject | test method | AS 4 notes | AS 5 notes |
---|---|---|---|
test subject | test method | AS 4 notes | AS 5 notes |
---|---|---|---|
test subject | test method | AS 4 notes | AS 5 notes |
---|---|---|---|
test subject | test method | AS 4 notes | AS 5 notes |
---|---|---|---|
Creation tests |
|||
Strategy: Create a destination. Make sure the destination is deployed. Verify that the properties of the corresponding ManagedComponent were set correctly. Make sure the appropriate success messages occur on the client side and on the server side. | |||
testCreateQueue | |||
testCreateTopic | |||
Strategy: Attempt to create a destination using invalid property values. Make sure the appropriate error messages occur on the client side and on the server side. | |||
testCreateQueueMissingRequiredValue | |||
testCreateTopicMissingRequiredValue | |||
testCreateQueuePropertyOutOfRange | |||
testCreateTopicPropertyOutOfRange | |||
testCreateQueueInvalidPropertyType | |||
testCreateTopicInvalidPropertyType | |||
testCreateQueueDuplicateJNDIName | |||
testCreateTopicDuplicateJNDIName | |||
Deletion tests |
|||
Strategy: Delete a destination. Make sure the ManagedComponent is removed. Make sure the appropriate success messages occur on the client side and on the server side. | |||
testDeleteQueue | |||
testDeleteQueueUsingExistingServiceFile | |||
testDeleteTopic | |||
testDeleteTopicUsingExistingServiceFile | |||
Configuration tests |
|||
Strategy: Change some of the properties associated with a destination. Make sure the appropriate success messages occur on the client side and on the server side. Make sure the properties of the ManagedComponent are updated accordingly. | |||
testConfigureQueueChangeProperties | |||
testConfigureQueueChangePropertiesUsingExistingServiceFile | |||
testConfigureTopicChangeProperties | |||
testConfigureTopicChangePropertiesUsingExistingServiceFile | |||
testConfigureQueueUnsetProperties | |||
testConfigureQueueUnsetPropertiesUsingExistingServiceFile | |||
testConfigureTopicUnsetProperties | |||
testConfigureTopicUnsetPropertiesUsingExistingServiceFile | |||
Metrics tests |
|||
Operations tests |
|||
The application strategy:
test subject | test method | AS 4 Notes | AS 5 Notes |
---|---|---|---|
Navigation | |||
assertion: Verify the navigation sequence to Applications. test Strategy: From the root of the navigation tree: Click JBossAS Servers ==> JBoss App Server:${config} ++> Applications |
testNavigationToApplications | ||
assertion: Verify the navigation sequence to Applications. test Strategy: From the root of the navigation tree: Click Applications |
testNavigationToApplicationsDirect | ||
assertion: Verify the navigation sequence to Applications. test Strategy: From the root of the navigation tree: |
testApplicationViewAllTypes | Once the list of all available applications are viewed, there is no way to navigate back to the previous list. Shelly to file JIRA. | |
assertion: Verify the navigation sequence to Applications. test Strategy: From the root of the navigation tree:Click JBossAS Servers ==> JBoss App Server:${config}==> Applications Verify the archives in the list when viewing SAR Types |
testApplicationViewSARTypes | ||
assertion: Verify the navigation sequence to Applications. test Strategy: From the root of the navigation tree:Click JBossAS Servers ==> JBoss App Server:${config}==> Applications Verify the archives in the list when viewing WAR Types |
testApplicationViewWARTypes | ||
assertion: Verify the navigation sequence to Applications. test Strategy: From the root of the navigation tree: Click JBossAS Servers ==> JBoss App Server:${config}==> Applications |
testApplicationViewEARTypes | ||
assertion: Verify the navigation sequence to Applications. test Strategy: From the root of the navigation tree:Click JBossAS Servers ==> JBoss App Server:${config}==> Applications Verify the archives in the list when viewing EJB Types |
testApplicationViewEJBTypes |
test subject | test method | AS 4 notes | AS 5 notes |
---|---|---|---|
verify deployment of basic web archive. | testBasicWarDeployment | ||
test subject | test method | AS 4 notes | AS 5 notes |
---|---|---|---|
verify deployment of standalone EJB .jar | testBasicEjbDeployment |
Fails because of NPE - JSFUnit bug? When done manually, EJB is deployed but not listed. EMBJOPR-73/74 |
|
test subject | test method Header 3 | AS 4 Notes | AS 5 Notes |
---|---|---|---|
Deploy Tests | |||
assertion: verify deployment of basic Enterprise Archive package Verify the resource was successfully deployed. |
testBasicEarDeployment | ||
assertion: Verify an .ear that contained a bad deployment descriptor fails deployment, fixed using console, and can then be successfully deployed. test Strategy: Deploy an .ear that is known to have a bad deployment descriptor. Verify the console shows deployment failed. Edit the .ear resource to fix the achive. Redeploy and verify the archive has been deployed successfully. |
testBadEarRedeploy | ||
assertion: Verify the navigation sequence to Enterprise Applications test Strategy: From the root of the navigation tree: Click JBossAS Servers ==> JBoss App Server:${config} ==> Applications ==> Enterprise Application |
testNavigationToEar | ||
assertion: Verify the content of the Enterprise Application Summary tab. | testEarSummary | ||
assertion: Verify the General Properties of a successfully deployed .ear test Strategy: After verifying an Enterprise Archive was successfully |
testEarProperties | ||
assertion: Verify the Resource Traits of a successfully deployed .ear. test Strategy: After verifying an Enterprise Archive was successfully deployed, select the .ear from the list of available applications on the Summary Tab of Enterprise Application (EAR). This brings you to Summary Tab of the deployed enterprise achive. Verify the Resource Traits: * Path: * Exploded?: |
testEarResourceTraits | ||
assertion: Verify the Metrics Summary of a successfully deployed .ear. test Strategy: After verifying an Enterprise Archive was successfully deployed, select the .ear from the list of available applications on the Summary Tab of Enterprise Application (EAR). This brings you to Summary Tab of the deployed enterprise achive. Verify the selection of the Metrics Summary option: * NAME |
testEarMetricsSummaryName | ||
assertion: Verify the Metrics Summary of a successfully deployed .ear. test Strategy: After verifying an Enterprise Archive was successfully deployed, select the .ear from the list of available applications on the Summary Tab of Enterprise Application (EAR). This brings you to Summary Tab of the deployed enterprise achive. Verify the selection of the Metrics Summary option: * VALUE |
testEarMetricsSummaryValue | ||
assertion: Verify the Metrics Summary of a successfully deployed .ear. test Strategy: After verifying an Enterprise Archive was successfully deployed, select the .ear from the list of available applications on the Summary Tab of Enterprise Application (EAR). This brings you to Summary Tab of the deployed enterprise achive. Verify the selection of the Metrics Summary option: * DESCRIPTION |
testEarMetricsSummaryDescription | ||
assertion: Verify the Configuration Page of a successfully deployed .ear. enterprise achive. Choose the Configuration Tab and verify the Configuration. |
testEarConfigurationPage | ||
assertion: From the Configuration Tab, Edit a deployed resource and SAVE the changes. test Strategy: Deploy an .ear. Verify it is UP. Navigate to the Configuration tab and Edit the Resource. Save the changes and verify the changes were saved. |
testModifyEarAndSave | Currently only see EDIT RESOURCE SAVE/CANCEL. Cannot edit the resource. Same as EMBJOPR-69? | |
assertion: From the Configuration Tab, Edit a deployed resource but CANCEL the changes. test Strategy: Deploy an .ear. Verify it is UP. Navigate to the Configuration tab and Edit the Resource. Cancel the changes and verify the resource did not get updated . |
testModifyEarAndCancel | ||
assertion: Verify the Metrics Page of a successfully deployed .ear. test Strategy: After verifying an Enterprise Archive was successfully deployed, select the .ear from the list of available applications on the Summary Tab of Enterprise Application (EAR). This brings you to Summary Tab of the deployed enterprise achive. Choose the Metrics Tab and verify the Trait Values as shown. * Path: * Exploded?: |
testEarMetricTraits | Does the user have control over whether the archive is exploded? | |
assertion: Verify the Metrics Page of a successfully deployed .ear. test Strategy: After verifying an Enterprise Archive was successfully deployed, select the .ear from the list of available applications on the Summary Tab of Enterprise Application (EAR). This brings you to Summary Tab of the deployed enterprise achive. Choose the Metrics Tab and verify the Numeric Values as shown. |
testEarNumericValues | What numeric values are expected to be exposed for a applications? | |
assertion: Verify the Metrics Page of a successfully deployed .ear. test Strategy: After verifying an Enterprise Archive was successfully deployed, select the .ear from the list of available applications on the Summary Tab of Enterprise Application (EAR). This brings you to Summary Tab of the deployed enterprise achive. Choose the Metrics Tab. Verify the use of the REFRESH button. |
testEarMetricsRefresh | ||
assertion: Verify an .ear can be updated reloading from disk. test Strategy: After verifying an Enterprise Archive was successfully deployed, select the .ear from the list of available applications on the Summary Tab of Enterprise Application (EAR). This brings you to Summary Tab of the deployed enterprise achive. Choose the Content Tab. Browse to pick up the .ear that is currently deployed. Hit Update. Verify the change to the archive. |
testEarContent |
What is the use case for this? Is it the intent that a newer version of the managed archive will be uploaded? When this action is invoked, NPE encountered. Shelly to file JIRA after further analysis
root cause org.jboss.seam.exception.Exceptions.parse(Exceptions.java:195) |