Groupon Releases It’s New Apple Watch App!

at June 29th, 2015

Screen Shot 2015-06-26 at 9.41.23 AM

Groupon iOS App version 3.12 went live this week and our mobile team packed it full of whiz bang features. Most notably, the new Groupon Apple Watch app was included and it has generated a bit of buzz. Partial though I might be, I am proud to say it’s my favorite app on Apple Watch today. But, don’t take my word for it. Check out the video we made to show it off.

One of the most challenging aspects of working on this app was that the team started prototyping it back in January, long before the Apple Watch was available to the public. You can imagine that the use cases for a watch app are vastly different than those for a mobile app and developing this with only the use of simulators (which have their own set of limitations) took much hard work and ingenuity.

Screen Shot 2015-06-26 at 9.41.37 AMThe team figured out some cool features just by being bold and trying things. For example, without much Apple documentation, they determined how to access a users location on the watch when the phone is in background mode. Our team decided to wait to release until the Apple Watch was out and they were able to do some final fit and finish work. This resulted in being able to separate ourselves out from the pack in terms of having an elegant and functional working app from the get go.

We are just getting started, though. The team has a few main areas they want to focus on for future iterations. They are supporting the next version of Watch OS, nailing proximity location and redemption and further refining the purchasing process. As I said in our recent press release: “We’re very excited about the potential of this new technology to increase the buying power of our customers and drive even more business to local merchants.”

Kudos to our hard working and talented mobile team and the larger Groupon tech community that made this all happen! I am proud to be part of this organization!


Groupon is proud to be a part of the new Node.js Foundation

at June 16th, 2015

nodejs

We are very excited to see that the Node.js and io.js developer communities have come together, combining their code bases to continue their work within the Node.js Foundation (hosted by the Linux Foundation). Groupon is proud to be among its supporting members. With the creation of a foundation backing Node.js we can ensure that this already thriving community will have continued growth and success far into the future.

Here at Groupon we believe that open collaboration is what leads to real innovation in the technology community. As I quoted in the press release Node.js infrastructure has been extremely important to us and is core to our platform.

Last year we completed a year-long project to migrate Groupon’s U.S. web traffic from a monolithic Ruby on Rails application to a new Node.js stack with substantial results. Since then we have moved all of our Mobile Web traffic and international traffic onto the same platform as well.

We have been participating and working with the Node.js community for several years now. By becoming a Node.js Foundation member, we’re able to give back to open source even more and support a technology that continues to drive Groupon’s business forward.


Groupon Recognized as a Top Mobile Company by Internet Retailer

at June 5th, 2015

groupon-mobile-commerce-award

Internet Retailer, which is one the largest ecommerce trade publications in the world, has honored Groupon as a leader in mobile commerce.

At the inaugural Internet Retailer Excellence Awards, Groupon won the Mobile Commerce Award––beating out Amazon, Target and QVC. The Mobile Commerce Award is given out to the retailer showing the greatest creativity, performance and sales growth from a mobile-specific website and/or app.

Dan Roarty, SVP of Marketplace, accepted the award and gave a few brief remarks as to why Groupon has been so successful in the world of mobile.

“At Groupon we think of our mobile experience as the great enabler for what is fast becoming an on-demand economy,” Roarty told the audience. “Whether its products, transportation, restaurants, spas or entertainment, consumers expect high quality and fast service at great value whenever they want it. Groupon is extremely fortunate that our business lends itself to this trend.”

It’s easy to see why the panel of esteemed judges chose Groupon as the first winner of this award. In under seven years, we’ve seen our business transform itself from a deal-of-the-day, delivered via email, to a mobile centric marketplace with hundreds of thousands of merchants selling billions of dollars of products and services to nearly 105 million people who have downloaded our app in 42 countries around the world.

“We’re excited to be part of the mobile transformation, and we will continue to push the boundaries in removing friction for customers and merchants alike by connecting local commerce in ways that never seemed possible before,” Roarty added.

Congratulations to the Groupon development team and everyone involved with Groupon’s award-winning mobile marketplace!


Automated App Performance Testing… Monkeys Not Included

at June 3rd, 2015

groupon_testdroid_v2

At Groupon we want to give our customers the best possible experience when using our mobile apps. A great experience is a fast experience. Achieving a fast experience requires ongoing performance testing. Our purchase order for an infinite number of monkeys was denied, so we’ve chosen to invest in test automation instead.

Instead of monkeys with stopwatches, we are using a combination of RoboRemote and Testdroid. RoboRemote is a remote control test framework for Android that utilizes UiAutomator and Robotium to control the application under test. RoboRemote sets application state, closes or restarts the application, monitors android debug bridge (ADB) logs and performs other steps necessary for repeatable and reliable tests.

Frameworks like Robotium or UiAutomator are great, but on their own a test automator has limited ability to do fun things like upgrading the app under test, clear app data or even reboot the device/emulator during a test. With RoboRemote (and other remote control frameworks such as Appium) an automator has a lot more freedom with direct access to ADB and the ability to run other commands on the host system. This flexibility comes in handy when you need to do something like setting initial application state for your performance tests.

Testdroid gives us the ability to run our automation on real devices whenever we want to. With the tools provided we can see useful information like cpu and memory usage after our tests conclude. Also we have the peace of mind that the devices will be available and managed for us. No one has to go into a room with a wall full of devices just to reboot one that was behaving erratically. We always know that we can walk into the office in the morning and see the results of our test automation. In other words, Testdroid gives us an efficient and reliable set of monkeys for our app performance test needs.

What is Being Measured?
If this is your first foray into mobile application performance testing then you may be wondering what should actually be measured or how to add markers/data points in your application. There are generally two parts to this.

  1. Define your metrics. For our example we are measuring application startup time, but that is a very general definition of the measurement. There is no universal definition of application startup time. You must define the metric for your application. It should be tied to an event where your user can start interacting with your app in a meaningful way. Using Groupon’s application as an example we would define it as being when the list of deals is shown to a customer. Even this definition is not specific enough. It still leaves room for interpretation. Does it mean we are measuring the time from when the user taps our icon to the main activity being started, or when we received a deal list from the server and rendered it, or when our images actually loaded and rendered? Remember that your choice of what to measure will subtly influence what your team works on optimizing. Choose wisely!
  2. Add the measurement. You may already have a fancy logging platform such as Splunk. In that case it should be as simple as identifying the right start/end point in your code and then log the time to your logging platform. If you don’t have a fancy logging platform you can simply log the results to logcat and post process the information.

How do the Performance Tests Work?
For this example we’ll be focusing on app startup performance, however the methodology can be applied to any part of your application. We’ll first run through the basic steps for the test and then dive into what the tests are measuring.

Step 1 – Setup your application’s basic state. For Groupon, a monkey has set our current location and dismissed any introductory screens.

Step 2 – Start your application.

Step 3 – Wait until your application gets to a known state. In Groupon’s case we wait for our deal list to load.

Step 4 – Exit the application. This step may vary depending on what you are trying to measure. For this example we are simply forcing the application to be closed. If your application caches data then you may needed to take some additional steps to clear that data. This all depends on what you are trying to measure.

Step 5 – Go back to step 2 and repeat X number of times. The more repeats the better.

Step 6 – Query your metrics platform (in our case Splunk) for all of the data generated during your tests. If you don’t have a platform for this then an alternative would be to log the data to the console and collect it via logcat. At Groupon we integrate this step within our Jenkins build by utilizing the Testdroid API to determine when our tests have finished executing and then firing off an API request to Splunk to collect the data.

Step 7 – Graph the data over time and evaluate it for any performance boosts or regressions. A very basic graph is shown below.

Everything you just read is an example of how Groupon approaches mobile performance testing. You should utilize the information to tailor your own strategy to mobile app performance testing. The important things to remember are:

  • Automation on real devices provides repeatability
  • You should have a well thought out metric to test
  • Finance will not let you get an infinite amount of monkeys

If you have questions about mobile performance testing please feel free to contact me at davidv@groupon.com.

There are many more great open source projects from the engineers at Groupon such as –

Odo – A mock proxy server for your automation, manual testing or development needs.
DotCI – Bringing the ease of configuration from cloud systems like travisi and the runtime configuration of docker to jenkins.
Testium – Integration testing for nodejs

Additional projects can be found at Groupon’s github page. If you are interested in positions at Groupon or think you can build a more effective automated monkey then please visit https://jobs.groupon.com

This post has been cross-posted to the Testdroid Blog.


HashiCorp Announces Vault, a Tool for Managing Secrets

at May 22nd, 2015

Sean Chittenden (Groupon Production Operations) invited Armon Dadgar from HashiCorp to give a Tech Talk about Vault, a new secrets management tool. Armon both unveiled Vault from our office and discussed its importance in securing and managing secrets in a modern datacenter. The implications of Vault’s new approach to this old problem are far reaching and could benefit engineering teams. We were delighted by the understanding HashiCorp brought to this problem space and are excited to see where this technology goes.

Thank you to Armon and HashiCorp for taking the time to share Vault with Groupon Engineering.


First Kill Bill hackathon

at April 17th, 2015

Groupon recently hosted a Payments Tech Talk where Stéphane and I went over our progress deploying Kill Bill internationally at Groupon, and what our roadmap for the rest of the year looks like. To our surprise, most attendees were engineers, and while we went over the architecture of Kill Bill, there was clearly an ask to dig deeper into the code. This is why we came up with the idea of a hackathon, which Groupon hosted in their San Francisco office last Saturday.

Because it was our first event of such kind, we decided to invite only engineers from a few select companies which we knew were already in the process of switching to Kill Bill and were familiar with the system. The event lasted from 11am to 7pm: Stéphane and I covered two brief technical sessions, but the rest of the afternoon was focused on coding and answering questions.

The day turned out to be quite productive: Greg wrote the first ever Kill Bill plugin in Scala, Sean gave Kaui a much needed facelift, and Ivan updated the Node.js client. We also had design discussions leading to API changes for 0.13.7 and talked about migration best practices. Even Stéphane and I managed to get some coding done: he wrote a performance benchmark testing specifically usage APIs, and I worked on automatic deployments of our Docker image to EC2 using Cloud 66.

The most exciting part of the day for me was when I realized the breadth of the ecosystem. When, at the beginning, we were all brainstorming about the type of projects to work on, quite a few ideas were generated, such as a Go client library, Chef recipes for deployment, and a new admin UI in AngularJS. While the very core of Kill Bill is a Java library, you don’t need to know Java to contribute to the project, and whether you are a back-end or front-end developer, whether you know Python or Rust, you can be part of the Kill Bill developer community (and if you want to do this as your full-time job, Groupon is hiring!).

We’re happy the event was a success, and we’ve already been asked to organize a follow-up one. This will happen at some point in the summer, and we will probably open it to a bigger audience. If you want to participate, get in touch!


Groupon Engineer Mike Burton Releases Android App Development for Dummies

at March 13th, 2015

indexAt Groupon, we do amazing things.

And none of them would be possible without our talented, passionate and curious employees who contribute to our distinct culture and make working at Groupon so great.

Our Head of Mobile Engineering, Mike Burton, is one example — and his passion extends well beyond the workplace. Driven by a penchant for all things Android, he’s just released the third edition of Android App Development for Dummies. The guide is the first to delve into the brand new Android Wear APIs and provide instruction on building apps for Android watches, TV and Kindle. Mike shares best practices and learnings from his experience building several successful apps both independently and on Groupon’s Android team.

I’m incredibly proud of Mike and have already purchased his book on Amazon. Be sure to message him at @roboguice if you’re a mobile developer and would like learn about opportunities on the team or to find out more about Mike’s extensive experience in the space.


Groupon in VentureBeat

at February 24th, 2015

Groupon’s excited to sponsor Venture Beat’s Mobile Summit for a second straight year. Great collection of mobile entrepreneurs and a ton of awesome ideas. I wrote an op-ed for the conference about the importance of mobile testing and tracking. Check it out here.