Skip to content

Importing & Exporting Mocks

Matthew Gallina edited this page Dec 12, 2019 · 8 revisions

sMockin features an Import / Export Manager allowing you to generate dowloadable files of any mock definitions created.

This can be useful for:

  • Backing up your mocks
  • Distributing your mocks to other installations of sMockin
  • Maintaining externalised version control of your mocks (in a SCM system like GitHub)

Exporting Mocks

  • Open http://localhost:8000/index.html in your browser
  • Go to the HTTP tab
  • From here expand and select any mocks you wish to export by ticking the record's checkbox
  • (To export all mocks simply click the select all link)
  • As soon as you have selected at least 1 mock this will enable the Export button
  • Once you are happy with your selection click the Export button and then finally click the Continue button in the confirmation window that appears
  • Depending on your browser this should now download or prompt you to download a zip file containing your selected mocks

Importing Mocks

  • Open http://localhost:8000/index.html in your browser
  • Go to the HTTP tab and click the Import button
  • From the HTTP Import Manager window select sMockin as the Import Type
  • Click the Select sMockin File... button and locate the sMockin export zip file you wish to import
  • Lastly click the Start Import button

A status report of how the import went will appear under the Import Result heading, informing you of what hs successfully been imported into sMockin.

Once done close the HTTP Import Manager window to return to the dashboard which should reload displaying your refreshly imported mocks.