TS 60 RESTSupport

(Difference between revisions)
(REST Support Test Specification for "NetBeans 7.4")
m (Test suite: REST support validation suite)
 
Line 26: Line 26:
#* {{result|EXPECTED RESULT: Project is successfully built and deployed on the server}}
#* {{result|EXPECTED RESULT: Project is successfully built and deployed on the server}}
# {{testcase|HTTP GET}}
# {{testcase|HTTP GET}}
-
## Run HTTP GET request against deployed RESTful web services (on URL: http://<host><:port>/<contextRoot>/restbean/microMarkets/)
+
## Run HTTP GET request against deployed RESTful web services (on URL: http://&lt;host&gt;&lt;:port&gt;/&lt;contextRoot&gt;/restbean/microMarkets/)
#* {{result|EXPECTED RESULT: XML returned from the service contains the same entries as Select * from "APP"."MICRO_MARKET"}}
#* {{result|EXPECTED RESULT: XML returned from the service contains the same entries as Select * from "APP"."MICRO_MARKET"}}
# {{testcase|HTTP POST}}
# {{testcase|HTTP POST}}
-
## Send [http://www.netbeans.org/source/browse/websvc/rest/test/qa-functional/data/input/purchaseOrder-new.xml sample xml] to http://<host><:port>/<contextRoot>/restbean/purchaseOrders/ using HTTP POST
+
## Send [http://www.netbeans.org/source/browse/websvc/rest/test/qa-functional/data/input/purchaseOrder-new.xml sample xml] to http://&lt;host&gt;&lt;:port&gt;/&lt;contextRoot&gt;/restbean/purchaseOrders/ using HTTP POST
#* {{result|EXPECTED RESULT: <nowiki>select * from "APP"."PURCHASE_ORDER" where order_num = 99999999 return new entry created by the service with quantity=75</nowiki>}}
#* {{result|EXPECTED RESULT: <nowiki>select * from "APP"."PURCHASE_ORDER" where order_num = 99999999 return new entry created by the service with quantity=75</nowiki>}}
# {{testcase|HTTP PUT}}
# {{testcase|HTTP PUT}}
-
##Send [http://www.netbeans.org/source/browse/websvc/rest/test/qa-functional/data/input/purchaseOrder-update.xml sample xml] to http://<host><:port>/<contextRoot>/restbean/purchaseOrders/ using HTTP PUT
+
##Send [http://www.netbeans.org/source/browse/websvc/rest/test/qa-functional/data/input/purchaseOrder-update.xml sample xml] to http://&lt;host&gt;&lt;:port&gt;/&lt;contextRoot&gt;/restbean/purchaseOrders/ using HTTP PUT
#* {{result|EXPECTED RESULT: <nowiki>select * from "APP"."PURCHASE_ORDER" where order_num = 99999999 return entry modified by the service with quantity=199</nowiki>}}
#* {{result|EXPECTED RESULT: <nowiki>select * from "APP"."PURCHASE_ORDER" where order_num = 99999999 return entry modified by the service with quantity=199</nowiki>}}
# {{testcase|HTTP DELETE}}
# {{testcase|HTTP DELETE}}
-
## Run HTTP DELETE request against deployed RESTful web services (on URL: http://<host><:port>/<contextRoot>/restbean/purchaseOrders/99999999/)
+
## Run HTTP DELETE request against deployed RESTful web services (on URL: http://&lt;host&gt;&lt;:port&gt;/&lt;contextRoot&gt;/restbean/purchaseOrders/99999999/)
#* {{result|EXPECTED RESULT: <nowiki>select * from "APP"."PURCHASE_ORDER" where order_num = 99999999 returns no entry</nowiki>}}
#* {{result|EXPECTED RESULT: <nowiki>select * from "APP"."PURCHASE_ORDER" where order_num = 99999999 returns no entry</nowiki>}}
# {{testcase|Clean up}}
# {{testcase|Clean up}}

Current revision as of 12:59, 24 September 2013

REST Support Test Specification for "NetBeans 7.4"

Updated: Efrem McCrimon
Author: Lukas Jungmann
Version: 1.1
Last update: 30/08/2013
Introduction: This test specification covers the RESTful web services support in the IDE.
Comments: See also project home, how to run tests

Contents


Test suite: REST support validation suite

Purpose: This suite tests basic functionality of the RESTful web sevices support in the IDE and it is intended to be automated and run on a daily basis.
Setup: IDE with latest build of GlassFish

+ SWDP and some existing web project with entity classes from bundled database
  1. Open Project
    1. Open prepared project in the IDE
    • EXPECTED RESULT: Project is visible in Project tab
  2. Create REST Classes
    1. Open New File Wizard
    2. Choose Web Services -> REST Web Services from Entity Classes and press Next
    3. Press Add All button and finish the wizard
    • EXPECTED RESULT: new sources are visible in the project view
  3. Build and deploy project
    1. Run Deploy action on the project with RESTful web services
    • EXPECTED RESULT: Project is successfully built and deployed on the server
  4. HTTP GET
    1. Run HTTP GET request against deployed RESTful web services (on URL: http://<host><:port>/<contextRoot>/restbean/microMarkets/)
    • EXPECTED RESULT: XML returned from the service contains the same entries as Select * from "APP"."MICRO_MARKET"
  5. HTTP POST
    1. Send sample xml to http://<host><:port>/<contextRoot>/restbean/purchaseOrders/ using HTTP POST
    • EXPECTED RESULT: select * from "APP"."PURCHASE_ORDER" where order_num = 99999999 return new entry created by the service with quantity=75
  6. HTTP PUT
    1. Send sample xml to http://<host><:port>/<contextRoot>/restbean/purchaseOrders/ using HTTP PUT
    • EXPECTED RESULT: select * from "APP"."PURCHASE_ORDER" where order_num = 99999999 return entry modified by the service with quantity=199
  7. HTTP DELETE
    1. Run HTTP DELETE request against deployed RESTful web services (on URL: http://<host><:port>/<contextRoot>/restbean/purchaseOrders/99999999/)
    • EXPECTED RESULT: select * from "APP"."PURCHASE_ORDER" where order_num = 99999999 returns no entry
  8. Clean up
    1. Undeploy test application from the server
    • EXPECTED RESULT: Application is not deployed on the server


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