Do it Yourself Testing
-
Upload
emily-stolfo -
Category
Technology
-
view
125 -
download
0
Transcript of Do it Yourself Testing
Ruby Engineer on the drivers team.
Based in Berlin.Maintain the gems:
bson mongo mongoid bson_ext mongo_kerberos
@EmStolfo
Organizations can experience 1 interface.
Specifications guide design and provide documentation.
Rewrites with collective knowledge.
MongoDB DriversRevamp
Specifications
Equally valuable to the drivers team as to the community.
The Spec Determine the "nearest" member as the one with the quickest response to a ping.“Choose a member randomly from those at most 15ms "farther" than the nearest member.
„I'm bored
Requirements for validating compliance• Unit tests. • Integration tests. • Tests define as “data”. • Language-agnostic. • Reproducible scenarios.
benefitsFormat: YAML
• Describes data. • Can translate to actions. • Most languages can use a YAML parsing
library. • Driver authors write a reusable harness. • Changes in the spec can be
communicated via additional YAML tests or changes to existing ones.
Test harness in each driver
1. Resource (mongodb) 2. Specification (parsed YAML) 3. Test (can be run)
Simple: (de)serialization
BSON unit testsported from the General Decimal Arithmetic
Specification by Mike Cowlishaw http://speleotrove.com/decimal/dectest.html
Server Discovery and Monitoring Spec
Logic required to make an application using MongoDB highly available.
Define clusters using JSON.Manipulate clusters via RESTful API.
Mongo OrchestrationHTTP server providing REST interface to manage
multiple MongoDB processes on the same machine.
Implemented in python.
Ask yourself1. Unit or integration tests? 2. Need to be language-agnostic? 3. Directly related to specs or
documentation?