Skip to content

Latest commit

 

History

History
56 lines (39 loc) · 1.68 KB

README.md

File metadata and controls

56 lines (39 loc) · 1.68 KB

tests2doc

Build Status npm version NPM License

Export your test cases from .js or .feature files to Google Docs Sheets.

Supported versions

Node.js:

  • 8.x
  • 9.x
  • 10.x
  • 11.x
  • 12.x

Installation

npm install tests2doc --save

Importing and configuring

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 your client_secret.json file - for example:

    CLIENT_SECRET_PATH='./secrets/client_secret.json'
  • TESTS_FOLDER_PATH - string with path to your tests 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

Thanks

If this script was helpful for you, please give it a ★ Star on github