Skip to main content

Set up your test environment

You can use Doc Detective directly against your production site. For testing, it's often useful to set up a local HTML server to run your tests. There are many server options. Live Server is a free utility that creates a local server that monitors your files for changes and updates the browser window automatically.

  1. Download TestExamples.zip and expand the file to your local disk.

  2. In a terminal, navigate to the expanded folder:

    cd <path-to-expanded-test-examples>

    Replace <path-to-expanded-test-examples> with the actual path where you expanded the TestExamples.zip file.

  3. Install and run a webserver. Running your tests against a local server allows you to make edits and see them in real time. Also, you need to serve the files in a web browser to experiment with video recording and other features.

    Any web server will do, but here are a few easy options (unassociated with Doc Detective):

    To run a local server with Python, you can use the built-in http.server module:

    python -m http.server 8080

    Once the server is started, you can open a browser window to http://localhost:8080. If you see a rendered page, you're ready to start testing!