Skip to content

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

License

Notifications You must be signed in to change notification settings

Marketionist/tests2doc

Repository files navigation

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