Introducing the next generation testing proxy we use at Groupon to the public:
Odo an http proxy with a RESTful API for mocking or partial rewriting of responses and requests
2. Leading the way in mobile
commerce
Our mobile app is available in 43 countries
Groupon’s vibrant mobile marketplace connects
consumers with their local economy
Sources: Internal Data; iTunes ranking for US stores available here -
https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewFeature?
Nearly 70 million people worldwide
have downloaded our mobile app to date; 9
million in Q4 2013.
One of the 25 most downloaded
free apps of all time
Nearly 50%
of our global transactions
completed on a mobile device in December
2013
15. Build a plugin
public class MyPlugins {
@ResponseOverride(
httpCode=302,
description="Return HTTP302")
public static String http302(String source) throws Exception {
return „<html><body>You are being redirected.</body></html>“;
}
Done
20. Proxy proxy = new Proxy(
Proxy.Type.HTTP,
new InetSocketAddress(
"192.168.56.1", 9090));
new URL("http://api...").openConnection(proxy);
HttpUrlConnection
21. OkHttp
Proxy proxy = new Proxy(
Proxy.Type.HTTP,
new InetSocketAddress(
"192.168.56.1", 9090));
OkHttpClient client = new OkHttpClient();
client.setProxy(proxy);
22. DefaultHttpClient httpclient =
new DefaultHttpClient();
httpclient.getParams().setParameter(
ConnRoutePNames.DEFAULT_PROXY,
new HttpHost("192.168.56.1", 9090));
Old school apache
25. Behind odo
• Utilizes forwarding proxy, Spring, Spring
Boot, Java servlets, embedded database
• Packaged as a .war file
• No setup required
26. Advantages
• Test Automation
• Avoid stub data maintenance
• Create dynamic test automation
• Manual Test
• UI allows easy configuration changes
• No coding knowledge required
• Development
• Remove dependencies on server changes for client
development
27. Odo + vs Charles
• Is free
• Is open source
• Is “programmable”
• Is extendable via plugins
• Has API
• Perfect for test automation
28. Where can I get Odo?
https://github.com/groupon
In a couple of days…
29. Follow us…
Abgeschottete Realität
Android Apps kontrolliert im Emulator testen
Danny Preussler, Groupon
The Day After
Lars Röwekamp, open knowledge
Danny Preussler, Groupon
In december nearly 50% of global transactions were done on mobile.. That’s so awesome.. And it means we have to create good tools to do more effective testing..
Tonight we’ll two tools created by the mobile test engineering team at Groupon. In the future we’d like to get some of you up here to share topics that you think everyone wants to hear about. Please send me a message on meetup or come talk to me afterwards about your ideas.
First up I’d like to get David Willson up here to talk about Odo…
You could create the complete response and use a mock server, but that comes with the disadvantage of having to maintain the stub data whenever the service changes.
You could create the complete response and use a mock server, but that comes with the disadvantage of having to maintain the stub data whenever the service changes.
You could create the complete response and use a mock server, but that comes with the disadvantage of having to maintain the stub data whenever the service changes.
You could create the complete response and use a mock server, but that comes with the disadvantage of having to maintain the stub data whenever the service changes.
You could create the complete response and use a mock server, but that comes with the disadvantage of having to maintain the stub data whenever the service changes.
Odo is a character from Star Trek Seep Space 9, he is a shapeshifter able to look like almost any object
Similar to the goals we had for this project to morph data into what we need for testing purposes.
Testing edge cases, simulating scenarios
There are two basic override types for Odo, the request override and the response override.
The request override takes place when Odo intercepts the client request to the service.
There are two basic override types for Odo, the request override and the response override.
The request override takes place when Odo intercepts the client request to the service.
There are two basic override types for Odo, the request override and the response override.
The request override takes place when Odo intercepts the client request to the service.
There are two basic override types for Odo, the request override and the response override.
The request override takes place when Odo intercepts the client request to the service.
There are two basic override types for Odo, the request override and the response override.
The request override takes place when Odo intercepts the client request to the service.
In this example, we are applying a custom response and simulating a 100ms delay
In this example, we are applying a custom response and simulating a 100ms delay
Set prox yon differerent clients
Set prox yon differerent clients
Set prox yon differerent clients
Man in the middle for windows phone
No install, packaged along with its dependencies.
Importing a preexisting configuration is a single step process.
For test automation, Odo makes it easy for us to simulate complex or edge-case scenarios
Manual testing get access to the same abilities through the UI
Client development doesn’t need to wait for server changes to verify their feature
There are additional features that make life easier, like multiple client support. With clients each user can specify their own override behavior configuration and not be affected by other clients. This allows for a central server that our developers can utilize instead of each running their own local instance.
Charles: on the fly change
Odo: prepare and let run