Getting Started - TESTaide
This document provides an example on how to get started with the TESTaide application purchased from the Azure Marketplace. You do not have to follow this guide, it is only meant to provide basic instructions for the main features of TESTaide to help you get started using our solution.
- 1 Steps for getting startedPrerequisites
- 1.1 Step 1 – Setup up the database configuration
- 1.2 Step 2 – Create a system administration user
- 1.3 Step 3 – Add a Test Environment
- 1.4 Step 4 – Create Project
- 1.5 Step 5 – Create Test Plan
- 1.6 Step 6 – Creating our Test Case
- 1.7 Step 7 – Add Test Case In Test Plan and Test
- 1.8 Step 8 – Change the status of test plan from Draft to Testing
- 1.9 Step 9 – Add Iteration
- 1.10 Step 10 – Test Execution
- 1.11 Step 11 – View Result
- 1.12 Step 12 – View
- 2 Python Example Code
Steps for getting startedPrerequisites
Follow the guide on how to create your own TESTaide Virtual Machine using the Azure Portal & how to start the TESTaide application.
Step 1 – Setup up the database configuration
Once you have started the TESTaide application, go to the application webpage, this would either be on the localhost:<port> or any other URL that has been setup for the virtual machine. The application will make you choose your preferred method for configuring the database.
There are two methods for the database configuration:
The pre-installed PostgreSQL database
Another database that has been configured externally.
Refer to this guide on configuring a database externally for TESTaide usage.
After you have finished the configuration, the application will restart so please wait one moment. It might take up to 1 minute to fully restart.
On the first start and initialization of the TESTaide application, it is highly recommended to restart the virtual machine to make sure that all database and Infrastructure Agent connections are properly made as intended. Simply restart the machine in the Azure portal & run the start command when the virtual machine has restarted to continue using the TESTaide application.
Step 2 – Create a system administration user
After having set up the database, it is time to create a system administration user. Simply enter the desired ID & password, press the ‘Next’ button, and proceed with logging in.
Step 3 – Add a Test Environment
We will be creating a Server-type environment for this guide, the server environment execute automated test cases locally on the host-machine.
From the navigation header, click the Environment option and click the Create Environment button.
Select the environment type as Server and enter the required, and any optional, fields and click the Save button.
Step 4 – Create Project
The next step is to create the project that we want to create test cases for.
From the navigation header, click the Project and click the Create Project button.
Enter the required, and any optional, fields and click the Save button.
For the environment field, select the name of the environment you created in step 3.
When you have been redirected to the homepage again, from the list of projects, click the project you created.
Step 5 – Create Test Plan
We will first create the test plan that we want to add our test cases for. The test plan can be placed in the ‘Testing’ phase which can then execute iterations of the plan with results provided for efficient management.
Select the Test Plan option from the left sidebar and click the Create Test Plan button.
Enter the required, and any optional, fields and click the Save button.
As we want to make test cases for a server, which automatically executed the tests, select the ‘Auto’ test plan type.
For the environment field, select the name of the environment you created in step 3.
Step 6 – Creating our Test Case
In this example, we will create a simple test case that logs in to the TESTaide web application with a provided username & password, and asserts that we have successfully logged in by reading the URL on the redirected page.
Select the Test Case option from the left sidebar and click the Create Test Case button.
On the test case creation page, enter the required, and any optional, fields and click the Test Case Save button.
Again, make sure to select the test case type as Auto!
On the ‘Test Script’ pop-up window, write the test script and click the Save button.
You can also provide a name for the script, test data, and expected results.
Any information written in the test data box can be used as a variable in the script and the expected result box is meant to assert your test case, and is executed after the main test script has finished.
Repeat these steps for all desired test cases.
You can find the Python code for the example script on the bottom of the page.
Step 7 – Add Test Case In Test Plan and Test
Now that we have created our test case(s), we will proceed to add them to our previously created test plan.
Select the Test Plan option from the left sidebar and, from the list of test plans, select the test plan created in step 5.
On the test plan detail page, click the Add Test Cases button on the top right of the page.
From the popup window, select the test case(s) created in step 6 and click the Add Test Case button.
(Optional) Click the ▶ button to the right of the Add Test Case button, select the server environment created in step 3, and click the Run button.
This executes the test plan without any iteration, which can be used to check the test case for errors before creating executable iterations.
Check the Exe Log tab for the results, if the python script is entered incorrectly, you will get an error.)
Step 8 – Change the status of test plan from Draft to Testing
On the test plan detail page, click More > Testing to move the test plan to the testing phase. This allows the plan to be viewable from the Test Execution page from the left sidebar.
Step 9 – Add Iteration
Select the Test Execution from the left sidebar and select the test plan created in step 5.
Click the Add Iteration button.
Enter a title and click the Save button.
Note that if the title includes a numerical value will the value automatically increase by 1 when creating the next iteration. This can be used to easily manage the test plan iterations.
Step 10 – Test Execution
Click the Run button to execute the iteration, this will redirect you to the execution page where you can view the results & execution log.
Step 11 – View Result
You can see the progress of the test with the progress bar.
On the TestStep tab is the list of test cases being tested and the test results.
From the Exe Log tab, you can see the log running the python script.
Step 12 – View
Click the Project Home option from the left sidebar.
After having executed iterations of test plans will you be able to see a graph with the test status and get a understanding of status for the project with a quick glance.
Python Example Code
Example Video
The video below shows the process of creating a test script.
Example test script
self.driver.get("http://localhost:8080/loginForm.do")
my_driver = self.driver
userIdEle = my_driver.find_element(By.NAME, 'logId')
passwordEle = my_driver.find_element(By.NAME, 'logPw')
submitEle = my_driver.find_element(By.CLASS_NAME, "btn-style")
userIdEle.send_keys(user_id)
passwordEle.send_keys(user_pw)
submitEle.click()
time.sleep(1)
Example test data
user_id='user10'
user_pw='password_user10'
Example expected result
self.assertIn("project.", my_driver.current_url)
Python Code
This is the Python code that is automatically created from your test case when TESTaide is executing your test plan.