Introduction
ACCELQ is a platform for automated testing. It provides tools for testing APIs, databases, and mobile and web apps. We can add multiple tests with intricate testing. We can coordinate and work with the other members of our team.

This blog will look at opening dynamic URLs (at runtime, from environment variables, etc.) and uploading files while performing tests in ACCELQ.
Opening Dynamic URLs in the Browser
Opening a URL in a browser using ACCELQ is very straightforward. We just provide the URL to be opened in the Initialize step. This step is available for all entry-point Contexts. But what if we want to open a dynamic URL, i.e., a URL whose value we do not know or which may vary?
Fortunately, ACCELQ has support for this as well. Let's see the various ways to open dynamic URLs in ACCELQ.
Environment-specific URLs
Sometimes, we may have different URLs for different environments.
For example, URLs of different environments may be
-
Production - live.codingninjas.org
-
Staging - staging.codingninjas.org
-
Testing - test.codingininjas.org
-
Development - dev.codingninjas.org
We can provide environment-specific URLs by simply referencing a Global Property in the Initialize step (which is the step in which we provide the URL).
Global Properties in ACCELQ are properties, or fields, that are applicable all across the project. These can contain values such as application URL, port number, API keys, etc.
We can configure them to have different values in different environments.
To pass an environment-specific URL,
-
Define a new Global Property in the Resources section of ACCELQ. Click on the Radio button that says, "Each Application Environment may have a different value." Specify appropriate values for each environment.
-
In the side-bar for the context (that we are adding this URL to), click the entry point URL. Set the left drop-down as Global Property and the right drop-down to point to the URL global property that you just created.
- If only specific scenarios need the Global Property, we can click on the initialize step of the Scenario and perform the same steps.
URL at Run Time
If we cannot hardcode the URL before runtime, we can override the URL in the Initialize step with a Run Property. Run Properties are properties whose definitions we provide in the Resources section. We only define the specification. The value is provided at run time. Whenever an action encounters a property defined as a Run Property, ACCELQ will show you a prompt where you can enter it.
To pass a URL at Run Time, we can override the URL in the Initialize step with a Run Property.
Parametrizing the URL
Sometimes, the URL can be completely dynamic - and based on your code's logic. We can meet this requirement by creating a new Action that:
-
Has the necessary parameters, such as server name, port number, etc.
-
Contains the logic to create the final URL.
After the logic to create the final URL, we can add the command to the Action. Then we simply provide it with the URL we have calculated. The command syntax is:
Load the browser with URL: <url>
Where <url> contains the URL we have calculated.
This newly created Action should be added right after the Initialize step in the Scenario. The URL provided in the Initialize Step will be overwritten by the one we create in this Action.




