0.5.3 • Published 9 months ago
@vtaas/client v0.5.3
VTaaS Client
Node.js client for VTaaS API.
Installation
npm i @vtaas/clientUsage
Import
In order to use API, an VTaaSApi instance must be created and configure with the right API key:
import { VTaaSV0Api, VTaaSV0ApiApiKeys } from '@vtaas/client/api'
const api = new VTaaSV0Api(process.env.VTAAS_URL)
api.setApiKey(VTaaSV0ApiApiKeys.ApiKeyAuth, process.env.VTAAS_TOKEN)Run a test
await api.run({
"description": "",
"url": "http://www.vtaas-benchmark.com:9999/",
"scenario": {
"name": "TC-1-P :: Registration",
"actions": [
{
"action": "Go to the site",
"expectedResult": "The site's home page is displayed on the \"Postmill\" tab.\nIn the header you can also see: \n- 4 other available tabs: Forums, Wiki, Login and Register\n- a search field\nThe \"Posmill\" page contains: Submissions (underlined), Comments, a default filter on \"Featured\" and a default sort on \"Hot\"."
},
{
"action": "Click on Sign Up",
"expectedResult": "A \"Sign Up\" title page appears.\nIt contains:\nA mandatory \"Username\" field, followed by a sentence indicating the characters allowed.\nA \"Password\" field followed by another field pasted below \"(repeat)\" followed by a sentence indicating the expected characteristics.\nAn optional e-mail address field followed by a sentence indicating that it will only be used to reset the password\nA srign up button"
},
{
"action": "Find a new unknown identifier, and enter this username and a password to be repeated twice.",
"expectedResult": "The password is hidden."
},
{
"action": "Click on Sign up",
"expectedResult": "\nRegistration works\nThe Postmill screen reappears.\nThere's a \"Your account has been registered\" message at the bottom of the screen.\nThe header still has the Postmill, Forums and Wiki tabs, as well as the search field. \nThe login and register tabs are replaced by a notification tab represented by an \"envelope\", a \"Submit\" tab and a tab with the account name (the username used)."
},
{
"action": "Click on the account name and select \"Log out\".",
"expectedResult": "The Connection tab appears"
},
{
"action": "Enter your account details and click on Login",
"expectedResult": "The connection works.\nThe postmill tab with the created user account is displayed"
},
{
"action": "Click on the account name and select \"My account\".",
"expectedResult": "The user account page appears.\nIt has a form to change credentials:\n - username\n - password\n - email address\nAnd below a button to delete the account"
},
{
"action": "Click on \"Delete this account\".",
"expectedResult": "The delete account page appears.\nIt warns users of the consequences of deleting their account.\nIt has a confirm username text input and a confirmation checkbox to make sure users know what they are doing."
},
{
"action": "Fill the chosen username, check the checkbox and submit the form",
"expectedResult": "The site's home page is displayed on the \"Postmill\" tab.\nIn the header you can also see: \n- 4 other available tabs: Forums, Wiki, Login and Register\n- a search field\nThe \"Posmill\" page contains: Submissions (underlined), Comments, a default filter on \"Featured\" and a default sort on \"Hot\"."
}
]
}
})