If you want to switch between different environments—such as an internal testing environment and a staging environment that closely mirrors production—you can use the Base URL setting.
The "Base URL" is the foundational part of a URL (e.g., https://example.com
) used during test execution.
This allows you to avoid creating separate test cases for each environment, streamlining development and testing workflows.
Examples:
Testing environment: https://example.develop.com
Production environment: https://example.com
You can configure the Base URL from the "Base URL" field under the "Advanced settings" tab in the test execution settings dialog.
Setting name 3:develop's BaseURL is
https://example.develop.com
Setting name 4:production's BaseURL is
https://example.com
When specifying URLs in test steps, please use root-relative paths (e.g., /index.html
).
Because MagicPod uses the configured Base URL as the starting point, specifying paths relative to the root (like /index.html
) allows your tests to automatically navigate to the correct URL for the selected environment
For example:
If the setting is 3: develop, the test navigates to https://example.develop.com/index.html
If the setting is 4: production, it navigates to https://example.com/index.html
Notes:
If you need to use a URL that does not rely on the Base URL during testing, enter an absolute URL starting with http://
or https://
.
Variables cannot be used in the Base URL field within the settings screen.