My master's study diploma thesis has been submitted. Here is the final report about outcome of my work.
My thesis analyses the REST architectural style and designs a testing and compliance tool (Java EE, JSP).
The final diploma thesis text can be downloaded here: https://dip.felk.cvut.cz/browse/pdfcache/haltulud_2012dipl.pdf
The source code of a testing tool (RESTfulChecker) is available here: https://github.com/lu2/RESTfulChecker
The testing tool (RESTfulChecker) runs here: http://ludva.tk:8080/RESTfulChecker/
Some notes relating to my masters diploma thesis can be found on my blog: http://lhaltuf.blogspot.cz/search/label/RADREST
Ludvik Haltuf's notebook
pátek 11. května 2012
středa 9. května 2012
The RESTfulChecker checking
The RESTfulChecker is working and can be accessed there. It is entry page with predefined tests, feel free to try it.
úterý 3. dubna 2012
Current state of Diploma Thesis
Summary of my diploma thesis work.
What has been done
Programming:
RESTfulChecker is working, as per commit ecdd67c6e6 it's validating Uniform Interface (by building tree and by validating HTTP headers) and Cacheability (by validating HTTP headers) constraints.
Asside of showing tree, it also shows each resource's response (by clicking on # sign) and OPTIONS response (by cliking on o sign).
It also showing result of validation (API is/is not RESTful) + prints REST violations for each resource.
No more REST constraints checking would be implemented (aside of questionnaires).
Writing:
So far all I wrote is here on my blog.
What needs to be done
Programming:
Correct/review implemented validation of 2 constraints.
Enhancing tool for REST testing by repeated testing capability. What about just allow to download xml with generated tree. Everyone can then compare this xml to expected xml? - work done?
Test it on something else then phprestsql.
Implements questionaiers for other 3 constraints, sixth (code on demand) is omited.
JUnits
Comments
Refactoring
Writing:
Mapping REST to HTTP analysis.
Finish RESTful API examples.
REST API description standardization.
What I am going to do now:
Start writing thesis for real (oficial text in LateX).
Learn myself to use OAUTH so I can acces more RESTful apis.
Find more REST APIs.
5weeks till handover.
What has been done
Programming:
RESTfulChecker is working, as per commit ecdd67c6e6 it's validating Uniform Interface (by building tree and by validating HTTP headers) and Cacheability (by validating HTTP headers) constraints.
Asside of showing tree, it also shows each resource's response (by clicking on # sign) and OPTIONS response (by cliking on o sign).
It also showing result of validation (API is/is not RESTful) + prints REST violations for each resource.
No more REST constraints checking would be implemented (aside of questionnaires).
Writing:
So far all I wrote is here on my blog.
What needs to be done
Programming:
Correct/review implemented validation of 2 constraints.
Enhancing tool for REST testing by repeated testing capability. What about just allow to download xml with generated tree. Everyone can then compare this xml to expected xml? - work done?
Test it on something else then phprestsql.
Implements questionaiers for other 3 constraints, sixth (code on demand) is omited.
JUnits
Comments
Refactoring
Writing:
Mapping REST to HTTP analysis.
Finish RESTful API examples.
REST API description standardization.
What I am going to do now:
Start writing thesis for real (oficial text in LateX).
Find more REST APIs.
5weeks till handover.
pondělí 26. března 2012
REST constraints questionnaire
As I previously wrote in my blogpost about automatic testing of REST constraints we have some REST constraints we cannot test automatically against black box API. These constraints are:
Note: by application I mean server application.
Client-Server:
Does your application providing service for other machines (clients)? yes
Is that service available to more then one client? yes
Does your application listening and responding for request on that service? yes
Stateless:
Does your application keeping any context while communicating with client? no
Does the client keeping all the needed context while communicating with your application? yes
Is one client request enough for your application to create appropriate response? yes
Layered System:
Are you leading client to access some part of your server's resources directly by these resources low level api? (E.g. when you need to provide some data from mysql database, do you provide client access to this database so it can query demanded data by itself?) no
(Green are answers that indicating fulfillment of constraint.)
- Client-Server
- Stateless
- Layered System
Note: by application I mean server application.
Client-Server:
Does your application providing service for other machines (clients)? yes
Is that service available to more then one client? yes
Does your application listening and responding for request on that service? yes
Stateless:
Does your application keeping any context while communicating with client? no
Does the client keeping all the needed context while communicating with your application? yes
Is one client request enough for your application to create appropriate response? yes
Layered System:
Are you leading client to access some part of your server's resources directly by these resources low level api? (E.g. when you need to provide some data from mysql database, do you provide client access to this database so it can query demanded data by itself?) no
(Green are answers that indicating fulfillment of constraint.)
středa 21. března 2012
Current plan
What was done in last week:
HTTP requirements for responses.
What I am going to do next week:
programing:
HTTP requirements for responses.
What I am going to do next week:
programing:
- validation of responses as sumarized in link above,
- finish junits tests.
- propose questionnaires for REST constraints we cannot test (done)
- some REST/nonREST api review (here at google docs).
úterý 20. března 2012
HTTP requirements for responses
Here I am going to make a summary of what is required in HTTP responses according to HTTP/1.1 rfc.
There are SHOULDs and MAYs in rfc, which I omit from my table as I will check only required restrictions.
source: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10 :
There are SHOULDs and MAYs in rfc, which I omit from my table as I will check only required restrictions.
source: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10 :
| response's status code | MUST NOT | MUST |
|---|---|---|
| 204 No Content | include message-body | |
| 205 Reset Content | include an entity | |
| 206 Partial Content | include other entity-headers if the response is the result of an If-Range request that used a weak validator | include
|
| 304 Not Modified |
| include
|
| 401 Unauthorized | include a WWW-Authenticate header field | |
| 405 Method Not Allowed | include an Allow header containing a list of valid methods for the requested resource. | |
| 416 Requested Range Not Satisfiable | response MUST NOT use the multipart/byteranges content- type |
úterý 13. března 2012
Table of contents for my diploma thesis
This is draft for my diploma thesis table of contents:
Czech language below is my outlines from my oficial diploma thesis assignment:
Analyzujte a teoreticky zpracujte mandatorní architektonická omezení, která definuje REST.
Která lze automaticky ověřit/testovat?
Současné aplikace pro testování REST.
Vytvořte nástroj, který vyhodnotí a otestuje RESTful API - SaaS.
Navrhněte a implementujte Web aplikaci pro opakovatelné testy.
Navrhněte standardní popis REST API
- Motivation - taken partly from this, moved to testing.
- REST constraints analysis - based on this.
- Mapping REST to HTTP analysis.
- REST constraints testing - based on this.
- Some REST APIs examples.
- Apps for REST testing - based on this.
- Creating tool for REST testing - based on this.
- Enhancing tool for REST testing by repeated testing capability (continuous integration?).
- REST API description standardization.
Czech language below is my outlines from my oficial diploma thesis assignment:
Analyzujte a teoreticky zpracujte mandatorní architektonická omezení, která definuje REST.
Která lze automaticky ověřit/testovat?
Současné aplikace pro testování REST.
Vytvořte nástroj, který vyhodnotí a otestuje RESTful API - SaaS.
Navrhněte a implementujte Web aplikaci pro opakovatelné testy.
Navrhněte standardní popis REST API
Přihlásit se k odběru:
Příspěvky (Atom)