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:// | + | ## Run HTTP GET request against deployed RESTful web services (on URL: http://<host><:port>/<contextRoot>/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:// | + | ## 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 |
#* {{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:// | + | ##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 |
#* {{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:// | + | ## Run HTTP DELETE request against deployed RESTful web services (on URL: http://<host><:port>/<contextRoot>/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
- Open Project
- Open prepared project in the IDE
- EXPECTED RESULT: Project is visible in Project tab
- Create REST Classes
- Open New File Wizard
- Choose Web Services -> REST Web Services from Entity Classes and press Next
- Press Add All button and finish the wizard
- EXPECTED RESULT: new sources are visible in the project view
- Build and deploy project
- Run Deploy action on the project with RESTful web services
- EXPECTED RESULT: Project is successfully built and deployed on the server
- HTTP GET
- 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"
- HTTP POST
- 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
- HTTP PUT
- 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
- HTTP DELETE
- 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
- Clean up
- Undeploy test application from the server
- EXPECTED RESULT: Application is not deployed on the server