TTA for Visual Studio Code
Develop
Create and edit automated tests in the comfort of your own development environment. No need to learn a new tool. Take advantage of all the modern features of VSC. Including formaters, linters, and your other favorite extensions.
Synchronize
Pull down a copy of your latest Test Plan or Custom Function and have your changes automatically synced back up to ServiceNow.
Execute Tests Locally
Speed up your development cycle by running tests locally and directly from VSC. You can watch as the browser opens, executes your tests, and immediately get feedback if anything went wrong.
** Local test execution requires a seperate installation of TTA Agent.
TTA VSC Extension User Guide
Extension Settings
These are the extensions global settings. Any settings that are not workspace specific will be found here.
To access the plugin's settings press Ctrl+ ,
and search for Tricentis Test Automation
.
- TTA: Custom Data Directory Path
- You can set a root directory for all the extensions stored data. If you change this setting your data will not be moved to the new location. Nor will the data be deleted from the old location. You can always "go back" to the previous location and access your data again.
- TTA: Runner
- Choose if you want local tests executed in Agent or Mini.
Workspace Settings
Each workspace has its own settings and configuration.
- Switch Workspace
- Allows you to change between workspaces.
- Create a workspace
- Delete a workspace
- Allows you to delete a workspace.
- You can not delete a workspace you are currently using.
- Deleting a workspace is permanent. All settings and local test plans associated with that workspace will be deleted.
- Deleting a workspace localy does not deleting anything in ServiceNow.
Authentication
- ServiceNow Instance (required)
- The fully qualified url to the ServiceNow Instance that holds your test plans.
- Basic Authentication
Username
- The TTA admin accounts user name.
Password
- The TTA admin accounts password. Passwords are hashed and securly stored in the OS's keychain.
- OAuth Url
- The fully qualified url to the ServiceNow Instance that provides OAuth service. Typically this is the same as url as the ServiceNow Instance.
Test Environment
These are the setting for the ServiceNow instance the tests are run or execute against. They can be the same or different then the instance that holds the test plans.
- ServiceNow
- The fully qualified url of the ServiceNow Instance you're testing against.
- Username
- The TTA admin accounts user name.
- Password
- The TTA admin accounts password. Passwords are hashed and securly stored in the OS's keychain.
- Version
- The named version of the ServiceNow instance you're testing against. [rome, quebec, paris]
Plans
Adding a Plan From ServiceNow
Click the +
button next to TTA Service Now Plans
.
The plugin will now try and connect to ServiceNow. If the connection is successful you will see a dropdown list of all the available test plans on your instance. If you have a large number of plans or if your network connection is slow this may take a few moments.
After the list appears select an item and click ok. You will see a message in the status bar indicating that it's downloading. Please be patient. The time it takes to download is based on the size of the plan and the speed of your network connection.
After the plan has been downloaded and processed it will show up in the TTA SERVICE NOW PLANS
panel.
Interacting With Test Plans
Test plans will be displayed in a tree-view for easy navigation. Each item under the Plan folder can be clicked on to either expand the folder or open it's contents in a new tab. All changes made will be synced with ServiceNow in real time.
Underneath the plan folder you will find the following.
- Plan Properties
- Holds all the properties for plans, suites, and cases.
- Suite Folders
- Each suite contains it's own
data
file and related cases.
- Case Folders
- Each Case has been split into 4 parts in the extension.
- data
- The data this specific Case needs to execute.
- before
- This code runs before the main Case script runs.
- This corresponds to the
on_before
field in ServcieNow.
- script
- This is the main code block for the test.
- after
- This code runs after the main Case script runs.
- This corresponds to the
on_after
field in ServcieNow.
- You can enable or disable each part by righ-clicking on them in the tree-view.
Refreshing a Plan
This will pull a fresh copy of the test plan from ServiceNow and overwrite all your local changes. You can not undo this process.
- To the right of the plan name click the
refresh
icon.
- You can not undo this process.
Custom Functions
Add a Custom Function From ServiceNow
Click the +
button next to TTA Custom Functions
.
The plugin will now try and connect to ServiceNow. If the connection is successful you will see a dropdown list of all the available custom functions on your instance. If you have a large number of custom functions or if your network connection is slow this may take a few moments.
After the list appears select an item and click ok. You will see a message in the status bar indicating that it's downloading. Please be patient. The time it takes to download is based on the size of the plan and the speed of your network connection.
After the custom function has been downloaded and processed it will show up in the TTA Custom Functions
panel.
Attachments
Adding Attachments From ServiceNow
You can pull down attachments from ServiceNow for use in local testing. This is only a one way sync. Changes to attachments will need to be done through the ServiceNow interface and resynced to the VSC.
- Click the
sync
button next to TTA Attachments
Local Test Execution
If you have TTA Agent
or TTA Mini
installed you can execute tests locally. Running tests in this manner will display the results locally and not show up in ServiceNow.
Hovering the mouse over a Plan, Suite, or Case will show a play icon.
Click the play icon to start execution.
- Clicking the play icon on a
Plan
will send all related Suites and Cases for execution on the TTA Agent.
- Clicking the play icon on a
Suite
will all related Cases for execution on the TTA Agent.
- Clicking the play icon on a
Case
will only send that Case for execution on the TTA Agent.
- All locally synced custom gunctions will be add to the test.
You can also execute smaller sections of code from the active Editor.
f9: Run Active Editor
shift+f9: Run Selected Text
ctrl+f9: Run From Cursor
Deleting Plans, Suites, Cases, or CustomFunctions
You can delete the local copy of any item. Just right-click on the item you wish to remove and select Delete
from the contex window.
- You can only delete the local copy. Deleted items will not be synced to ServiceNow.
- If you want to permanently delete a Plan, Suite, Case, or customFunction you must go throught ServiceNow interface.