TS 73 Cloud

Oracle Cloud Support Test Specification

Author: Jiri Skrivanek
Version: NetBeans 7.3
Last update: 29-th November 2012
Bugzilla: javaee/Oracle Cloud
Introduction: This test specification is focused on testing NetBeans support for Oracle Public Cloud. It is based on internal document and also some links points to internal sources.
Important: To gain an access to Oracle Cloud Services a trial account must be set up. Go to cloud.oracle.com and request a Java trial subscription.

Contents


Test suite: Register Oracle Cloud

  1. Register Oracle Cloud
    1. Download Oracle Cloud SDK from stbeehive.oracle.com and unzip it somewhere.
    2. In NetBeans Plugins manager, install the Oracle Cloud plugin from Certified Plugins UC.
    3. Go to Services view.
    4. Right-click Cloud node and choose "Add Cloud...".
    5. Select "Oracle Cloud" and click Next
    6. Fill in required values for your trial cloud instance:
      • Identity Domain: ...
      • Java Service Name: java
      • Database Service Name: database
      • Service Administrator: ...
      • Password: ...
    7. Click Configure and browse for oracle-javacloud-sdk-1.0.0 folder.
    8. Click Next and then Finish.
  2. Oracle Cloud Node
    1. Right-click Oracle Cloud node and choose Refresh.
    2. Right-click Oracle Cloud node and choose "View Jobs and Logs".
    3. In open pane click Refresh and it should reload.
    4. Click some items in the list and check it shows appropriate logs.
    5. Click Close button to close this pane.
    6. Right-click Oracle Cloud node and choose Properties.
    7. Check that Cloud Providers window is opened and it shows all configuration properties.
    8. Try to change password and click Close. You get a message that is not possible to connect to cloud.
    9. Open Properties again and fix the password.
    10. Right-click Oracle Cloud node and choose Remove.
    11. Check that node disappeared.
    12. Open "Tools|Cloud Providers" from main menu.
    13. Click "Add Cloud..." and register Oracle Cloud again.

Test suite: Deployment

  1. Deploy Web Application
    1. Open new project wizard, select "Java Web|Web Application" and click Next.
    2. Click Next again and choose "Oracle Cloud Remote" as a target server. Only Java EE 5 is currently supported.
    3. Click Finish.
    4. Right-click project node and choose Run.
    5. Check that deployment was successful and browser with "Sign In" form appears.
    6. Provide "User ID" the same as for "Service Administrator" and "Identity Group" as "Identity Domain".
    7. Index page should be opened if credentials were correct.
  2. Whitelist Support
    1. When a Web project's server is set to a Oracle Cloud Remote then Whitelist panel is automatically enabled and shown in project's properties and panel will list Oracle Public Cloud whitelist in enabled state. This whitelist will be applied not only to the Web Project but also to all its J2SE subprojects. When a whitelist is enabled automatically in some J2SE project then Whitelist panel is shown in project properties of such project as well. This informs user and give them control over what whitelist is used in which project. Few examples of WhiteListRules .
    2. Create a new servlet in project.
    3. In in processRequest() method body try to type "System.ex" and notice that method is crossed out in code completion and identified as disallowed by Oracle Cloud whitelist.
    4. Ignore code completion warning and add to your servlet code like "System.exist(-1);" and save file.
    5. Verify that code is underlined with warning hint. Tooltip of the hint says "Method exit not allowed from java.lang.System."
    6. Open "Window|Action Items" view and make sure that filter (an action with funnel icon) is set to "Show All". Also click "Group items by category" action (just under Filter action) and notice that there is category called "White Lists violations" which lists violation in servlet.
    7. Right-click project node and try action "Verify"
    8. Action will build WAR and run command line whitelist tool on it and display output of the tool in Output window.
    9. Try to deploy project with whitelist violation and notice that warning dialog is shown telling user about whitelist violations and asks whether user want to continue with deployment or not.
    10. Click Yes and deployment should fail with appropriate error messages in "Oracle Cloud Remote Deployment" console.
    11. Remove System.exit(-1), right-click NewServlet.java and choose "Run File".
    12. Verify that browser with servlet is opened.
  3. Oracle Cloud Remote Node
    1. Go to Services view and expand "Oracle Cloud Remote" node.
    2. Right-click "Oracle Cloud Remote" node and choose Refresh.
    3. Right-click "Oracle Cloud Remote" node and choose Properties.
    4. Classpath combo box should list all locally registered WebLogic servers in the IDE. If none is available a generic Java EE API is used as fallback.
    5. Right-click your application (e.g Application1) and choose View.
    6. Check browser is opened.
    7. Right-click your application and choose Stop.
    8. Wait until application is stopped. During stopping hourglass badge icon should be displayed and if you right-click, all actions should be disabled.
    9. Check application is not accessible in browser and black square badge icon appears.
    10. Right-click your application and choose Start.
    11. Wait until application is started. During starting hourglass badge icon should be displayed and if you right-click, all actions should be disabled.
    12. Check application is accessible in browser and black square badge icon disappears.
    13. Right-click your application and choose Undeploy.
    14. Wait until application node disappears.
    15. Open Jobs and Logs view on "Cloud|Oracle Cloud" node and verify your deploy/stop/start/undeploy operations are included in the list.
  4. Deploy Enterprise Application
    1. Open new project wizard, select "Java EE|Enterprise Application" and click Next.
    2. Click Next again and choose "Oracle Cloud Remote" as a target server. Only Java EE 5 is currently supported.
    3. Click Finish.
    4. Add Session bean with business method to EnterpriseApplication1-ejb project.
    5. Right-click project node and choose Run.
    6. Check that deployment was successful and index page is opened.
    7. Repeat "Oracle Cloud Remote Node" and "Whitelist support" test cases for enterprise application.
  5. Deploy Maven Web Application
    1. Open new project wizard, select "Maven|Web Application" and click Next.
    2. Click Next again and choose "Oracle Cloud Remote" as a target server. Only Java EE 5 is currently supported.
    3. Click Finish.
    4. Right-click project node and choose Run.
    5. Check that deployment was successful and index page is opened.
    6. Repeat "Oracle Cloud Remote Node" and "Whitelist support" test cases for maven application.
  6. Deploy Maven Enterprise Application
    1. Open new project wizard, select "Maven|Enterprise Application" and click Next.
    2. Click Next again and choose "Oracle Cloud Remote" as a target server. Only Java EE 5 is currently supported.
    3. Click Finish.
    4. Add Session bean with business method to mavenproject1-ejb project.
    5. Right-click project node and choose Run.
    6. Check that deployment was successful and index page is opened.
    7. Repeat "Oracle Cloud Remote Node" and "Whitelist support" test cases for maven enterprise application.
  7. Deploy CRUD application (JSF/JPA/DB)
    1. In Services view perform Add Server action on Servers node
    2. In the opened dialog choose server Oracle WebLogic Server and click Next
    3. Specify correct location, where WebLogic is installed. Click Next.
    4. Type in default password "welcome1" for default user name "weblogic"
    5. Make sure you do NOT enable JPA 2.0 while registering it - this does not work due to cloud bug
    6. Click Finish button.
    7. Open properties for "Oracle Cloud Remote" node and verify Classpath combo box contains "Oracle WebLogic Server".
    8. Open new project wizard, select "Java Web|Web Application" and click Next.
    9. Click Next again and choose "Oracle Cloud Remoter" as a target server.
    10. Click Next and select JavaServer Faces.
    11. Click Finish.
    12. Open project properties and change target server in Run category to "Oracle WebLogic Server".
    13. Open new file wizard.
    14. Select "Persistence|Entity Classes from Database" and click Next.
    15. From "Data Source" combo box select "New Data Source".
    16. Choose JNDI name for this data source that matches the database service name that was provisioned for you in the cloud ("database" for our nbtrial account).
    17. Choose "New Database Connection..." in "Database Connection" combo box.
    18. In "New Connection Wizard" select "Java DB (Network)" and click Next.
    19. Provide localhost/1527/sample/app/app values, check "Remember password".
    20. Click "Test Connection" and then Next.
    21. Select APP schema and click Finish.
    22. Click OK in "Create Data Source" dialog.
    23. Select MICRO_MARKET table and click "Add >".
    24. Click Next, provide package name and click Finish.
    25. Open new file wizard again.
    26. Select "JavaServer Faces|JSF Pages from Entity Classes" and click Next.
    27. Click "Add All >>" and then Next, Next and Finish.
    28. Right-click project node and choose Run.
    29. Check that application was successfully deployed and opened in browser.
    30. Open project properties and change target server in Run category to "Oracle Cloud Remote".
    31. Open persistence.xml and change table generation strategy to Create.
    32. Right-click project node and choose Run.
    33. Wait for application opened in browser and try to create, update, delete items from MICRO_MARKET table.
    34. Verify your application is listed under "Oracle Cloud Remote" node in Services view and undeploy it.
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo