Ecco un articolo sull’integrazione con Selenium Test nel Developer Cloud Service, che include un’applicazione di esempio. Trovate l’originale qui.

Enjoy 🙂

This blog entry illustrates how to configure DevCS to run a simple Selenium Test against a very basic web page. Thanks to Nobuhiko Sekiya – Oracle Senior Sales Consultant for his valuable input.

The selenium test java class ( inside the eclipse (OEPE project, easywebapp, will just verify the string shown in the web page (top.jsp). To begin, download the simple eclipse project with selenium test,, from the attachment below. Import this project into your eclipse IDE and connect to your DevCS cloud instance. Note: This application was created and tested in DevCS 15.4.5 with deployment to JCS and not JCS-SX. Now you want to push this source to your DevCS project. If you haven’t created a project in DevCS, then do so now. A good tutorial to follow that illustrates creating a project in DevCS, importing an “Existing Project into a Workspace” in OEPE and synchronizing the workspace with DevCS is available on the DevCS Product Page here.

Note: JCS-SX by default has authentication enabled and a login dialog will popup at access. This is not the case with JCS. Therefore in this example, the Selenium test will fail on JCS-SX.

Now for the core of configuring DevCS to run a Selenium Test. This resides in Hudson Build Configurations and Deployment Configurations. Note: You will have to have a successful build of your app before you can set up an automatic deployment profile in that you will have to have a deployable artifact to complete the deployment configuration. Once you’ve successfully built your easywebapp, you create your deployment configuration and then further configure your Hudson easywebapp_build job. You will also create a second build job named easywebapp_selenium and it is set to run whenever easywebapp_build is built. So as you see, there are a few dependencies here and you will have to go back into your build jobs to further configure them as you go through this process.

So here we go and hopefully it all makes sense when we’re finished. Note: If not shown in these images settings are at the default.

Hudson Build Job easywebapp_build
Step 1: Create a new Hudson build job – easywebapp_build

Step 2: Configure build job Source Control settings

Step 3: Configure build job Triggers

Step 4: Configure build job Build Steps

Step 5: Configure build job Post Build activities. Note: This shows adding the Deploy Task. You won’t be able to add this until after you’ve had a successful build and then created the Deployment Configuration.


Step 6: Save your configuration and run your build. If successful, you will have a build artifact to work with in creating a deployment profile. Also notice the Add Deploy Task at the bottom of the previous image. You will modify this Hudson build job once you’ve created your deployment profile and add the following information:
Deployment Configuration: easywebapp
Job: easywebapp_build
Artifact: target/easywebapp.war

Step 7: Your Deployment Configuration will be configured as follows and Note: you will have to do this before modifying your Hudson build job easywebapp_build as I outlined at the beginning of Step 6 above. After successfully creating this Deployment configuration, you will modify the Hudson Build Job easywebapp-build as illustrated in Step 6 above.
Configuration Name: easywebapp
Application Name: easywebapp
Java Service: Select your JCS Service that your previously configured. See further reading at the end of this blog entry for details.
Type: On Demand
Job: easywebapp_build
Build: Pick the most recent stable build (Note: the Selenium test will run against the most recent deployment)
Artifact: easywebapp/target/easywebapp.war


Hudson Build Job easywebapp_selenium
Step 1: Create a new Hudson build job – easywebapp_selenium

Step 2: Configure build job Source Control settings


Step 3: Configure build job Triggers and select the build job easywebapp_build


Step 4: Configure build job Environment Xvfb Screen and Display Name Offset

Step 5: Configure build job Build Steps. Note: that the environment variables HTTPS_PROXY_HOST and HTTPS_PROXY_PORT are available to Hudson. The baseurl in Properties should be set to your JCS access url (to the JCS load balancer or directly to the managed server). See further reading at the end of this blog entry for details.

Step 6: Configure build job Post Build activities to see the test results after the build is finished.


Step 7: Run the Hudson build job easywebapp_build which will build the app, deploy the artifact (.war) to JCS and run the selenium test against JCS. You can validate success via the log files as configured in Step 6 above.

Further information – Configuring DevCS to deploy to JCS
Check out Edi Vaserman’s blog entry on “How to deploy from your Developer Cloud Service to JCS” to learn how to configure your deployment with public and private keys for your environment.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s