Export your test cases from .js
or .feature
files to Google Docs Sheets.
- 8.x
- 9.x
- 10.x
- 11.x
- 12.x
npm install tests2doc --save
You will need to enable the Google Sheets API for the project in order to access Spreadsheets - see instructions.
You can require tests2doc in your .js
file and configure it like this:
const { exportTestCases } = require('tests2doc');
exportTestCases();
Function exportTestCases
returns an array of test cases and exports them to Google Sheets.
When launching the script (your .js
file that contains exportTestCases();
) 2 parametes should be provided:
-
CLIENT_SECRET_PATH
- string with path to yourclient_secret.json
file - for example:CLIENT_SECRET_PATH='./secrets/client_secret.json'
-
TESTS_FOLDER_PATH
- string with path to yourtests
folder - for example:TESTS_FOLDER_PATH='./src/tests'
So it will look like:
CLIENT_SECRET_PATH='./secrets/client_secret.json' TESTS_FOLDER_PATH='./src/tests' node index.js
If this script was helpful for you, please give it a ★ Star on github