Mocks and Testability
All our 99-minute workshops are included with a Pro membership.
Most of the time, when we develop software, we rely on third-party services to accomplish a certain outcome so that we don’t have to re-invent the wheel. This is where mocks can come in handy.
- Identify software integration problems that are solvable with mocks
- Outline how mocks work in an end to end context
- Setup a project that uses "mockserver" to replace the integration with a 3rd party system
Meet Your Instructor
Ali Haydar
SOFTWARE ENGINEER
A software engineer and lifelong learner. I strongly believe that good software is built through good collaboration and communication, and hence I am a big fan of the DevOps ways of working. I had the opportunities to work in multiple roles in the software industry, starting with testing, development, product/project management. I love technology in general, and enjoy learning about new tools that make the engineers' lives easier.
Google definition of mock is: make a replica or imitation of something. It could be a useful tool that makes testing easier (i.e. increases testability)
Mocks and Testability
Ali
99 Minute Workshop
Most of the times, when we develop software, we rely on third party services to accomplish a certain outcome so that we don’t have to re-invent the wheel. However, this introduces a new level of complexity, especially around testability.
This where the usage of mocks comes handy. Google definition of mock is: make a replica or imitation of something. It could be a useful tool that makes testing easier (i.e. increases testability).
Mocking isn’t new, and there are lots of articles on the internet about it, but it is less frequent to see content about mocks in the context of a system testing or end to end testing. Usually when creating unit tests, software engineers rely a lot on mocks to mock objects or functions that the unit being tested relies on.
In this workshop, we will be exploring mocks at the end to end level, where we do functional testing of a system that integrates with an external system.
Takeaways
- Identify software integration problems that are solvable with mocks
- Outline how mocks work in an end to end context
- Setup a project that uses "mockserver" to replace the integration with a 3rd party system
Prerequisites
Having the following setup before the workshop would be great, as it will enable us to focus more on the main topic (mocks) and do some discussions about it during the workshop. Please let us know if you face any problems with the setup.
- Install Node.js npm
- Install the LTS (Recommended for most users).
- npm is installed automatically with NodeJS, when you install node you get npm with it.
- Verify the installation: node -v
- Install ts-node (TypeScript for Node.js):
- npm install -g typescript
- npm install -g ts-node
- Install Docker - Docker is used to run the mock server, but it can also be installed as a node application too
- Install Git
- Install vscode or any other code editor you prefer
- Register a Marvel account and get your API keys
This workshop requires working knowledge of the JavaScript ecosystem. You can check out our Introduction to JavaScript course if you need to get up to speed.

99 Minute Workshops
Short Digestable Live Online Workshops
Live and Instructor-led
All our 99-Minute Workshops are hosted live and led by an instructor.
Short and Targeted
These workshops are a max of two hours long which means they can easy be fit into your busy week. The short time also means they are targeted on a few learning outcomes.
Learn with Others
Connect and learn with other community members during these live online testing workshops.
Available with Pro Membership
All our 99-Minute Workshops are available with Pro Membership, you can attend as many as you like. We also do the odd free workshop with our partners.
All our 99-minute workshops are included with a Pro membership.
Frequently Asked Questions
Are the Workshops Recorded?
Our 99-minute workshpos are designed to be attended live. If you can’t make the scheduled time, it will stay available to replay in CrowdCast for 7 days. To get the most out of them, we highly recommend you attend them live.