Background Image
MSL logo

Attack Front-End Testing

With FINRA’s MSL

What’s in a Name?

msl

Mock
Service
Layer

Our Mock Service Layer (MSL) app hasn’t always been known as “missile.” The dev team considered other names, like SLAM for Service Layer Mocking, but ran into a trademark issue. We recognized our primary drive is to fire away, testing sooner and faster - even before the environment is ready - mocking the service layer. With Mach speed, we named our invention MSL.

Our technologists are passionate about what they do. They persistently build cutting edge applications so we can protect investors and keep the markets fair. FINRA’s Mock Service Layer (MSL), the brainchild of developer Daniel Koo, demonstrates this creative passion which leverages open source and keeps us ahead of the curve.

The impetus for MSL (pronounced missile) began when Koo and colleague Bryan Robbins were watching the 2013 Google Test Automation Conference (GTAC) via a live YouTube stream. They’d attempted to join the New York conference in person, but were unable to secure spots due to the conference’s popularity. Instead, the two reserved a FINRA conference room and watched the software and test engineers’ online presentations.

Their virtual attendance in April 2013 inspired the invention of MSL, a client side integration testing tool that blasts through testing bottlenecks, bypassing the need for full system level end-to-end browser automation. With MSL, testing occurs sooner and faster – even before the environment is ready. “The idea is a client server model where the server does the mocking to aid you in setting up and mocking tests,” said Robbins. MSL was quickly adopted by 10 FINRA products and earned the duo a prime slot presenting at GTAC 2014 in Kirkland, Washington in October.

With MSL, Koo and team reduced test development and run-time to align more closely with the demands of our agile teams who leverage layered architecture like Model View Controller (MVC). “There was a lot of focus on JavaScript testing,” Koo said of GTAC 2013. “I started to look at tools to see if there was anything out there that could meet our need. There was no perfect tool we could use. Development began.”

MSL was born to develop and execute faster front-end tests in isolation using a Node.js server, mocking the service layer with a hermetic server. Tests can be run without a network. “Our main strategy was to reduce the number of end-to-end tests needed and replace them with targeted tests at different points in the system,” Robbins said.

MSL drastically reduces the effort spent on functional browser full stack end-to-end automation testing, an approach Koo says FINRA had been following for the past 10 years. Isolated testing with hermetic servers started heating up in the past year, he added.

Koo, Robbins and fellow MSL developers Chien-Hung Kuo and Jacob Sheppard released MSL to the open source community in July 2014. Four months after it was open sourced, MSL logged more than 500 downloads on the server side. Its client components have registered nearly 400 downloads in the same time period. The MSL Karma plugin, which integrates the test runner, was released in October 2014 and recorded 467 downloads in one month.

Our development team integrated MSL with popular open source tools like Jasmine, Express and Karma. We received positive feedback from meetup groups in New York from the NYC Metro Selenium Users in May and at the Montgomery County Java User Group (MCJUG) in Rockville, Maryland in August. GTAC attendees were also complimentary. Robbins and Koo learned that they had been working in parallel with Google and Facebook developers, who were building tools similar to MSL. "It showed us we were in line with the high tech movement," Robbins said.

It showed us we were in line with the high tech movement.

Get MSL

Check out our MSL project page for an introduction video, API documentation and meet our MSL team. Download MSL from FINRA’s open source repository on GitHub. Learn about FINRA’s other open source projects here. Watch Koo and Robbins’ GTAC presentation here.


Old Method

Full application testing = 30% API testing + 70 % E2E testing (full stack)

Full application testing = 1 hours to execute API tests + 15 hours to execute E2E tests = 16 hours

Our New Approach with MSL

Full application testing = 60% UI testing + 30% API testing + 10% E2E testing

Full application testing = 1 hour to execute UI tests + 1 hour to execute API tests + 1 hour to execute E2E test = 3 hours

Method View:


  • UI
    1 HOUR
  • API
    9 HOUR
  • E2E
    15 HOUR
    • 10%
    • 30%
    • 90%

msl

Mock
Service
Layer

Our Mock Service Layer (MSL) app hasn’t always been known as “missile.” The dev team considered other names, like SLAM for Service Layer Mocking, but ran into a trademark issue. We recognized our primary drive is to fire away, testing sooner and faster - even before the environment is ready - mocking the service layer. With Mach speed, we named our invention MSL.

Keeping up with Industry Trends

MSL graphic

While presenting their Mock Service Layer (MSL) to fellow engineers, FINRA developers Bryan Robbins and Daniel Koo took note of the atmosphere – flexibility, freedom to think and innovate in collaborative workspaces.


Learn More

Tech Gurus

MSL and GTAC

FINRA Developers Daniel Koo and Bryan Robbins were two of 1,500 applicants to the 2014 Google Test Automation Conference (GTAC) in Kirkland, Washington. Of the 1,500 who applied, nearly 200 wanted to present. This year there were 14 presentations and eight lightning talks – 22 total speaking opportunities. FINRA joined speakers from Facebook, Inc., Google, Netflix, Hewlett-Packard (HP), Dropbox, Comcast, American Express and Adobe Systems.


GTAC logo

Learn More