๐Ÿ“ฆ JohanLorenzo / markdown-testfile-to-json

A parser which transform manual tests in Mardown to JSON

โ˜… 1 stars โ‘‚ 2 forks ๐Ÿ‘ 1 watching
๐Ÿ“ฅ Clone https://github.com/JohanLorenzo/markdown-testfile-to-json.git
HTTPS git clone https://github.com/JohanLorenzo/markdown-testfile-to-json.git
SSH git clone git@github.com:JohanLorenzo/markdown-testfile-to-json.git
CLI gh repo clone JohanLorenzo/markdown-testfile-to-json
Johan Lorenzo Johan Lorenzo Document the output of the parser f83fd70 10 years ago ๐Ÿ“ History
๐Ÿ“‚ master View all commits โ†’
๐Ÿ“ lib
๐Ÿ“ test
๐Ÿ“„ .coveralls.yml
๐Ÿ“„ .editorconfig
๐Ÿ“„ .gitattributes
๐Ÿ“„ .gitignore
๐Ÿ“„ .jshintrc
๐Ÿ“„ .travis.yml
๐Ÿ“„ .yo-rc.json
๐Ÿ“„ cli.js
๐Ÿ“„ execute-cli.js
๐Ÿ“„ Gruntfile.js
๐Ÿ“„ index.js
๐Ÿ“„ package.json
๐Ÿ“„ README.md
๐Ÿ“„ README.md

NPM version Build Status Dependency Status Coverage Status

A parser which transform manual tests in Mardown to JSON

As a command line tool

$ ./cli.js test-formated-file.md [test-formated-file2.md...]

$ npm install --global markdown-testfile-to-json
$ markdown-testfile-to-json --help

As a library

Install

$ npm install --save markdown-testfile-to-json

Usage

var markdownTestfileToJson = require('markdown-testfile-to-json');

markdownTestfileToJson([inputFile1, inputFile2]).then(function(testsuites) {
  // Do something with the testsuites
});

Syntax

General structure

`` markdown # Suite Name ## product.app.test_case_id decorator Test instructions %%CODEBLOCK4%% markdown Valid ## fxos.sms.send_mms Not valid ## fxos.sms.send_MMS ## fxos.sms.send-mms %%CODEBLOCK5%% bug n `, with n the bug number that introduced the feature on [Bugzilla](https://bugzilla.mozilla.org/). You can also define the user story that introduced the feature on [Aha](http://aha.io): ` story n `. You can choose to not activate a test with one of these decorator: ` draft disabled xfail `. If none of these decorator is provided, the test will be considered active. ` markdown Valid ## fxos.sms.send_mms bug 1 Not valid ## fxos.sms.send_mms bug 1 ## fxos.sms.send_mms disabled %%CODEBLOCK6%% markdown # SMS suite | TMobile | Wi-FI | No Internet | 2G | 3G | Multiple SIMS | Reference Workload | AT&T | Automatic Download | Delivery Reports | Airplane Mode | Dual SIM priority | Multiple Recipient Thread | :-- |:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-: fxos.sms.send_sms | x | x | x | x | x | x | x | x | x | x | x | x | x fxos.sms.send_mms | x | x | x | x | x | x | x | x | x | x | x | x | x fxos.sms.forward_sms | | | x | | | | | x | | | | | fxos.sms.call_recipient | | | x | | | | | x | | | | | ## fxos.sms.send_sms bug 1 Send a text message to another phone number. ## fxos.sms.send_mms bug 2 Receive a text message from another phone number. ## fxos.sms.forward_sms bug 3 Send an SMS you received to another contact. ## fxos.sms.call_recipient bug 4 From a text conversation, perform a call to your contact. %%CODEBLOCK7%% markdown ## fxos.sms.text_new_number bug 5 Create a new text message and add the following recipients: recipients | should pass ---- | ---- 123 | yes +++ | no contact name | yes %%CODEBLOCK8%% json [{ "name": "SMS suite", "testcases": [{ "id": "fxos.sms.send_sms", "instructions": "Send a text message to another phone number.", "state": "active", "bug": 1, "variablesFromSuite": ["TMobile", "Wi-FI", "No Internet", "2G", "3G", "Multiple SIMS", "Reference Workload", "AT&T", "Automatic Download", "Delivery Reports", "Airplane Mode", "Dual SIM priority", "Multiple Recipient Thread"] }, { "id": "fxos.sms.send_mms", "instructions": "Receive a text message from another phone number.", "state": "active", "bug": 2, "variablesFromSuite": ["TMobile", "Wi-FI", "No Internet", "2G", "3G", "Multiple SIMS", "Reference Workload", "AT&T", "Automatic Download", "Delivery Reports", "Airplane Mode", "Dual SIM priority", "Multiple Recipient Thread"] }, { "id": "fxos.sms.forward_sms", "instructions": "Send an SMS you received to another contact.", "state": "active", "bug": 3, "variablesFromSuite": ["No Internet", "AT&T"] }, { "id": "fxos.sms.call_recipient", "instructions": "From a text conversation, perform a call to your contact.", "state": "active", "bug": 4, "variablesFromSuite": ["No Internet", "AT&T"] }] }] %%CODEBLOCK9%% json [{ "name": "SMS suite", "testcases": [{ "id": "fxos.sms.text_new_number", "instructions": "Create a new text message and add the following recipients:", "state": "active", "bug": 5, "variables": [{ "recipients": "123", "should pass": "yes" }, { "recipients": "+++", "should pass": "no" }, { "recipients": "contact name", "should pass": "yes" }] }] }] ``

License

MIT