sql protocol test tools - microsoft · api design –model first method auto generated no yes (auto...
TRANSCRIPT
![Page 1: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/1.jpg)
SQL Protocol Test ToolsEric Bortei-Doku
![Page 2: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/2.jpg)
Agenda
Test tool options – overview (SQL Sever and Data platform protocols) SQL server parsers
Test suites
OData Validator
Model First
A closer look at two of the tools (OData Validator, Model First)
Resources
Q & A
![Page 3: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/3.jpg)
Test Tools Overview: SQL Server Parsers
Two main categories of tests:▪ Unit tests – for testing messages indicated in protocol spec
▪ Scenario tests – for verifying full functionality (messages, structure parsing, operation, summary line info)
▪ Used with Message Analyzer for examining protocol traffic
▪ Goal is 100% test coverage (combination of unit & scenario testing)
▪ Download: https://connect.microsoft.com/site216/Downloads
[Current listing being refreshed to match updates in protocols]
![Page 4: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/4.jpg)
Test Tools Overview: SQL Test Suites
Developed for testing partner implementations of protocols that are based on Microsoft open specifications.
Normative statements (MAY, MUST SHOULD) used for requirements
Suitable requirements are grouped, turned into test cases
Related test cases are grouped into scenarios
Collections of scenarios + adapters turned into Test Suites
![Page 5: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/5.jpg)
Test Tools Overview: SQL Test Suites - setup
![Page 6: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/6.jpg)
Test Tools Overview: SQL Test Suites - results
![Page 7: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/7.jpg)
Agenda for a Closer Look
![Page 8: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/8.jpg)
OData Validator Tool(Web UI)
![Page 9: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/9.jpg)
First: OData - Overview
OData (Open Data Protocol) defines a set of best practices for building and consuming RESTful APIs.
Has become an industry standard. ISO/IEC approved
OASIS standard
![Page 10: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/10.jpg)
OData Validator - Overview
Architecture involves an OData client and an OData server
This tool used for validating OData server responses
OData protocol spec provides info about how to interpret/validate the server responses
Point OData validator at endpoint to validate payloads: Service document
Metadata document
Feed, entity and error
![Page 11: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/11.jpg)
HTTP
OData Validator – Overview (continued)
![Page 12: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/12.jpg)
Why use the OData Validator?
A key part of the ecosystem surrounding the OData protocol
Multiple targets: service doc, metadata doc, feed, entry and error responses
Multiple OData protocol versions supported
Additional selections provided as optional validation configurations
Open source project: http://odatavalidator.codeplex.com/
![Page 13: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/13.jpg)
Design
- OData Validator
![Page 14: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/14.jpg)
Rules come from
▪ MS-ODATA:
• http://msdn.microsoft.com/en-us/library/dd541188.aspx
▪ OASIS specs:
• http://www.odata.org/documentation/odata-version-4-0/
The goal is to test all the normative parts of the specs
▪ MAY, MUST SHOULD statements in specs
Validation Rules Design
![Page 15: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/15.jpg)
OData Validator - Architecture
Response header & payload
Request target
![Page 16: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/16.jpg)
OData Validator - Operation
![Page 17: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/17.jpg)
DEMO
![Page 18: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/18.jpg)
OData Validator – Usage options
Validator connects to OData service via:
URI
Direct input (JSON, or Atom format)
Validator can test OData service for:
Conformance
Metadata
Service implementation
![Page 19: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/19.jpg)
Using OData Validator with a URI
OData target service:▪ http://services.odata.org/V4/TripPinServiceRW
Select other options as needed
Click or tap Validate
![Page 20: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/20.jpg)
{"@odata.context": "http://services.odata.org/V4/OData/OData.svc/$metadata#Products/$entity","@odata.type": "#ODataDemo.Product","@odata.id": "http://services.odata.org/V4/OData/OData.svc/Products(1)","@odata.editLink": "Products(1)","ID": 1,"Name": "Milk","Description": "Low fat milk","[email protected]": "#DateTimeOffset","ReleaseDate": "1995-10-01T00:00:00Z","DiscontinuedDate": null,"[email protected]": "#Int16","Rating": 3,"Price": 3.5,"[email protected]": "Products(1)/Categories/$ref","[email protected]": "Products(1)/Categories","[email protected]": "Products(1)/Supplier/$ref","[email protected]": "Products(1)/Supplier","[email protected]": "Products(1)/ProductDetail/$ref","[email protected]": "Products(1)/ProductDetail”
}
Use OData Validator with Direct Input
![Page 21: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/21.jpg)
Model First Tool_____
![Page 22: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/22.jpg)
Model First Tool - Overview
Allows you to model an API, before implementation with code
Makes it possible to test as you design your API
Generates documentation & tests automatically
![Page 23: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/23.jpg)
API Design – Traditional Method
NO
YES
(Manually created Ref docs)
![Page 24: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/24.jpg)
API Design – Model First Method
AutoGenerated
NO
YES
(Auto docs manually fine-tuned)
![Page 25: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/25.jpg)
Model First Tool - Features
A powerful editor, visually renders API model code in interactive window
Incorporates Swagger UI and interactive features
YAML as input for modeling API
Swagger or Mark Down as outputs
![Page 26: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/26.jpg)
Model First Tool - UI
![Page 27: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/27.jpg)
Live Demo of Books & Blog OData Service
Link to tool: Model-First
Input language is YAML
![Page 28: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/28.jpg)
Resources
OData Validator – Web UI▪ OData sample service
▪ OASIS Spec
OData Validator – GitHub
ISO/IEC approved
OASIS standard
Model First – GitHub▪ Model-First – (Live tool)
![Page 29: SQL Protocol Test Tools - Microsoft · API Design –Model First Method Auto Generated NO YES (Auto docs manually fine-tuned) Model First Tool - Features A powerful editor, visually](https://reader035.vdocument.in/reader035/viewer/2022071110/5fe5faedecaac11f54504ea3/html5/thumbnails/29.jpg)
Thank You!Questions?