Posting a file through the Mogotest API

We recently rolled out a big enhancement to our prepared test run API. This API allows you to create a test run without actually starting it, so you can customize the run by adding your own URLs. Previously, the URLs needed to be accessible, either publicly our through our tunnel tool. Sometimes, however, the page you want to test is only accessible after you've conditioned it in some way. Perhaps you use Selenium and you want to submit a form then test the page in Mogotest. Well, now you can do just that.

When you add a URL to the test run you can now optionally send a file value along with it. You have two options here: POST to our API using a multi-part form just as you would when uploading a file on a web site; or, just set the file value to a string representation of the file you want to upload (binary files must be base64-encoded). When you start the test run, we'll reassemble the document and any linked resources you've posted on an internal web server that we'll test against. That way we can test against the same state you had your site in at the time you uploaded the files to us. You can also mix-and-match between testing uploaded files and others that you just want to retrieve directly from your Web server.

This is a great way to integrate Mogotest with your existing functional testing suite. Let us know what you think!

blog comments powered by Disqus