Test your local folders containing HTML files
Learn how to test your local folders containing HTML files with Local Testing.
Local Testing enables you to test your local folders containing HTML files of your website on Live, without hosting your website internally or locally.
Prerequisites
Ensure that Local Testing is set up. For steps, see Setup Local Testing.
Enable local folder testing
To enable folder testing, follow these steps:
- Open the Local Console (
http://localhost:45454/
).
Alternatively, you can click the Local icon on your system tray or the top bar menu. And, then click Options. - On the Tunnel Settings panel, click Show More.
- In the Folder Testing field, enter the absolute path to the local folder that you want to test. Then, click Update.
A local folder URL is generated and displayed below the text field. Copy this local folder URL.
To enable folder testing, you need to establish the Local Testing connection with the --folder
flag and the absolute path of your HTML file.
To enable folder testing, follow these steps:
- Open your command-line window.
- Change the directory to the directory where the BrowserStackLocal binary is saved.
- Run the following command on your command-line window:
Here,
-
YOUR_ACCESS_KEY
is your account access key. You can find it on your account’s Settings page. -
ABSOLUTE_PATH_TO_HTML_FILE
is the absolute path to the HTML file you want to test.
After you run the command, a local folder URL is generated. Copy the generated local folder URL.
This local folder URL can only be accessed by BrowserStack remote machines. The format of the local folder URL is as follows:
http://YOUR_USERNAME.browserstack.com
You can also find your local folder URL on your account’s settings page. On this page, under the Local Testing section, your local folder URL is displayed.
Test your local folder
To test your local folder, follow these steps:
- In your browser, open the Live dashboard.
- Select the device-browser combination to launch a Live session.
BrowserStackLocal might request your permission to access the files in your folder. Click OK to allow. - In your Live session, paste the copied local folder URL in the remote browser’s address bar.
You can now continue testing your local folder.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!