REST Support Test Specification for "NetBeans 6.0"
Author: Lukas Jungmann
Version: 1.0
Last update: 30/05/2007
Introduction: This test specification covers the RESTful web services support in the IDE.
Comments: See also
project home,
how to run tests
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