Thursday, December 13, 2018

Test and Code: 58: Testing REST APIs with Docker containers and pytest

Let's say you've got a web application you need to test.
It has a REST API that you want to use for testing.

Can you use Python for this testing even if the application is written in some other language? Of course.
Can you use pytest? duh. yes. what else?
What if you want to spin up docker instances, get your app running in that, and run your tests against that environment?
How would you use pytest to do that?
Well, there, I'm not exactly sure. But I know someone who does.

Dima Spivak is the Director of Engineering at StreamSets, and he and his team are doing just that.
He's also got some great advice on utilizing code reviews across teams for test code, and a whole lot more.

Special Guest: Dima Spivak.

Sponsored By:

Support Test & Code

Links:

<p>Let&#39;s say you&#39;ve got a web application you need to test.<br> It has a REST API that you want to use for testing. </p> <p>Can you use Python for this testing even if the application is written in some other language? Of course.<br> Can you use pytest? duh. yes. what else?<br> What if you want to spin up docker instances, get your app running in that, and run your tests against that environment? <br> How would you use pytest to do that?<br> Well, there, I&#39;m not exactly sure. But I know someone who does.</p> <p>Dima Spivak is the Director of Engineering at StreamSets, and he and his team are doing just that.<br> He&#39;s also got some great advice on utilizing code reviews across teams for test code, and a whole lot more.</p><p>Special Guest: Dima Spivak.</p><p>Sponsored By:</p><ul><li><a rel="nofollow" href="https://testandcode.com/digitalocean">DigitalOcean</a>: <a rel="nofollow" href="https://testandcode.com/digitalocean">Get started with a free $100 credit </a></li></ul><p><a rel="payment" href="https://www.patreon.com/testpodcast">Support Test &amp; Code</a></p><p>Links:</p><ul><li><a title="Introducing the StreamSets Test Framework" rel="nofollow" href="https://streamsets.com/blog/introducing-the-streamsets-test-framework/">Introducing the StreamSets Test Framework</a></li><li><a title="pytest-benchmark · PyPI" rel="nofollow" href="https://pypi.org/project/pytest-benchmark/">pytest-benchmark · PyPI</a></li><li><a title="StreamSets Test Framework-based tests for StreamSets Data Collector" rel="nofollow" href="https://github.com/streamsets/datacollector-tests">StreamSets Test Framework-based tests for StreamSets Data Collector</a></li><li><a title="StreamSets: Where DevOps Meets Data Integration" rel="nofollow" href="https://streamsets.com/">StreamSets: Where DevOps Meets Data Integration</a></li></ul>

from Planet Python
via read more

No comments:

Post a Comment

TestDriven.io: Working with Static and Media Files in Django

This article looks at how to work with static and media files in a Django project, locally and in production. from Planet Python via read...