The concept is to define specs, test cases, and status using an excel spreadsheet. A GitHub Workflow is used to generate the specs, push them to a branch, and then execute session(s) using the defined status.
Spec | Spec Description | Tag | Case | Case Description | Steps | Status | Comments |
---|---|---|---|---|---|---|---|
One | This is a spec | t1 | case 1 | Do something | do this | P | |
One | t1 | case 2 | Do something | do that | F | this is a comment |
Multiple tabs within the excel spreadsheet will be represented as groups in Testspace.
This repo is a template
to be used on the s2testorg
. All credentials (secrets) have been set up - TESTSPACE_CRED
and GH_PAT_FOR_TF
.
testit
workflow manually.NOTES:
secrets
will not be defined, a Team account is required for private org level secrets. It is simple to create new specs.
testit.xlsx
on your desktop. .
on the repo.Excel Viewer
(takes ~2 seconds). This enables to modify existings cells.Note, you can add other spreadsheets to the repo. To execute a different spreadsheet, pass in the name when running the workflow.
The following tools have been used in developing this utility:
The following is an overview of the sheet format:
Spec | Spec Description | Tag | Case | Case Description | Steps | Status | Comments |
---|---|---|---|---|---|---|---|
One | This is a spec | t1 | case 1 | Do something | do this | P | |
One | t1 | case 2 | Do something | do that | F | this is a comment | |
Two | Another spec | t2 | case 1 | Basic stuff | check it |
Steps
and Comments
P | p
, F | f
, N | n
(NA)blank
is mapped to Untested
Tab
represents a group, if there is more than 1 tabTESTSPACE_CRED
- "Username:Password"; either super-admin
or testuser
GH_PAT_FOR_TF
- s2-testspace
GitHub Personal Access Token used for installing the private testspace test function packagepip install -r requirements.txt
npm install
To generate Specs for a branch:
git checkout -b testit
python generate.specs.py testit.xlsx
git add .
git commit -m "auto-gen specs"
git push origin testit
To run sessions:
Onetime setup:
export TESTSPACE_CRED="USERNAME:PASSWORD" # Using super admins credentials
export HEADLESS=false # not working in Codespaces
Project setup:
export GHORG="NAME" # export GHORG=munderseth or s2testorg
export REPO="NAME" # export REPO=testspace.testit
To run session(s):
node run.sessions.js BRANCH-NAME specs/allSessions.json # node run.sessions.js testit specs/allSessions.json
Note, don't forget to make sure that the repo has access to the TESTSPACE_CRED
secret. Refer to personal Codespaces settings.
Create a .testspace.yml
file:
manual:
issues:
provider: generic
release:
- "*"
Create a .gitignore
file:
node_modules
_site
.jekyll-cache
Required for script:
pip install pandas
pip install openpyxl
Excel Viewer
Required for Notebook (Codespaces)
pip install ipykernel
python -m ipykernel install --user --name=testspace.testit
Note, don't forget to make sure that the repo has access to the GH_PAT_FOR_TF
secret. Refer to personal Codespaces settings.
npm init --yes
Production packages required for the /src/ts.js
module.
npm install request
npm install request-promise
npm install @octokit/rest
npm install puppeteer
Note. Using ts.js
from https://github.com/s2technologies/testspace.test