Skip to content

Commit 4677b85

Browse files
committed
Update README and version
1 parent 31be37d commit 4677b85

File tree

3 files changed

+54
-50
lines changed

3 files changed

+54
-50
lines changed

README.md

+48-44
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,31 @@ $ assertthat-bdd -i PROJECT_ID -a ASSERTTHAT_ACCESS_KEY -s ASSERTTHAT_SECRET_KEY
2020

2121
Available parameters:
2222
```
23-
-V, --version output the version number
24-
-a, --accessKey [ASSERTTHAT_ACCESS_KEY] Access key
25-
-s, --secretKey [ASSERTTHAT_SECRET_KEY] Secret key
26-
-t, --token [ASSERTTHAT_API_TOKEN] Jira API token (Server and DC only)
27-
-u, --jiraServerUrl [URL] Jira server URL e.g https://mycompanyjira.com
28-
-f, --features Download features
29-
-r, --report Upload report
30-
-i, --projectId <ID> Jira project id
31-
-j, --jsonReportFolder [FOLDER PATH] Cucumber json files folder
32-
-m, --mode <mode> Features to download (default: "automated")
33-
-l, --tags <tag-expression> Cucumber tag expression for scenarios filtering
34-
-n, --runName [NAME] Test run name
35-
-d, --metadata [FILE PATH] Metadata json file path
36-
-o, --outputFolder [FOLDER PATH] Features output folder
37-
-q, --jql [JQL] JQL filter for features download or Jira issues to update with test results
38-
-t, --jsonReportIncludePattern [PATTERN] Pattern for json file names
39-
-x, --proxyURI [URI] Proxy URI
40-
-b, --numbered [true|false] Append number to feature name on download
41-
-h, --help output usage information
42-
43-
```
44-
45-
Mandatory parameters are -i, -a, -s (if -a or -s is missing the plugin will attempt to read them from ASSERTTHAT_ACCESS_KEY and ASSERTTHAT_SECRET_KEY environment variables respectively.
23+
Options:
24+
-V, --version output the version number
25+
--projectId <ID> Jira project id
26+
--accessKey [ASSERTTHAT_ACCESS_KEY] Access key
27+
--secretKey [ASSERTTHAT_SECRET_KEY] Secret key
28+
--token [ASSERTTHAT_API_TOKEN] Jira API token (Server and DC only)
29+
--jiraServerUrl [URL] Jira server URL e.g https://mycompanyjira.com
30+
--features Download features
31+
--report Upload report
32+
--jsonReportFolder [FOLDER PATH] Cucumber json files folder
33+
--mode <mode> Features to download (default: "automated")
34+
--tags <tag-expression> Cucumber tag expression for filtering scenarios (default: "")
35+
--runName [NAME] Test run name
36+
--metadata [FILE PATH] Metadata json file path
37+
--outputFolder [FOLDER PATH] Jira project id
38+
--jql [JQL] JQL filter for features download and report upload
39+
--jsonReportIncludePattern [PATTERN] Pattern for json file names
40+
--proxyHost [Host] Proxy Host
41+
--proxyPort [Port] Proxy Port
42+
--numbered [true|false] Append number to feature name on download
43+
-h, --help output usage information
44+
45+
```
46+
47+
Mandatory parameters are --projectId, --accessKey, --secretKey (if --accessKey or --secretKey is missing the plugin will attempt to read them from ASSERTTHAT_ACCESS_KEY and ASSERTTHAT_SECRET_KEY environment variables respectively.
4648

4749
## Using from within a script
4850

@@ -90,17 +92,18 @@ assertThat.downloadFeatures({
9092
Available parameters:
9193

9294
```
93-
-a, --accessKey [ASSERTTHAT_ACCESS_KEY] Access key
94-
-s, --secretKey [ASSERTTHAT_SECRET_KEY] Secret key
95-
-t, --token [ASSERTTHAT_API_TOKEN] Jira API token (Server and DC only)
96-
-u, --jiraServerUrl [URL] Jira server URL e.g https://mycompanyjira.com
97-
-i, --projectId <ID> Jira project id
98-
-m, --mode <mode> Features to download (default: "automated")
99-
-l, --tags <tag-expression> Cucumber tag expression for scenarios filtering
100-
-o, --outputFolder [FOLDER PATH] Jira project id
101-
-q, --jql [JQL] JQL filter for features
102-
-b, --numbered [true|false] Append number to feature name on download
103-
-x, --proxyURI [URI] Proxy URI
95+
--accessKey [ASSERTTHAT_ACCESS_KEY] Access key
96+
--secretKey [ASSERTTHAT_SECRET_KEY] Secret key
97+
--token [ASSERTTHAT_API_TOKEN] Jira API token (Server and DC only)
98+
--jiraServerUrl [URL] Jira server URL e.g https://mycompanyjira.com
99+
--projectId <ID> Jira project id
100+
--mode <mode> Features to download (default: "automated")
101+
--tags <tag-expression> Cucumber tag expression for scenarios filtering
102+
--outputFolder [FOLDER PATH] Jira project id
103+
--jql [JQL] JQL filter for features
104+
--numbered [true|false] Append number to feature name on download
105+
--proxyHost [Host] Proxy Host
106+
--proxyPort [Port] Proxy Port
104107
```
105108

106109
* For uploading reports:
@@ -137,16 +140,17 @@ assertThat.uploadReports({
137140
Available parameters:
138141

139142
```
140-
-a, --accessKey [ASSERTTHAT_ACCESS_KEY] Access key
141-
-s, --secretKey [ASSERTTHAT_SECRET_KEY] Secret key
142-
-t, --token [ASSERTTHAT_API_TOKEN] Jira API token (Server and DC only)
143-
-i, --projectId <ID> Jira project id
144-
-j, --jsonReportFolder [FOLDER PATH] Cucumber json files folder
145-
-n, --runName [NAME] Test run name
146-
-t, --jsonReportIncludePattern [PATTERN] Pattern for json file names
147-
-q, --jql [JQL] JQL filter for Jira issues to update with test results
148-
-x, --proxyURI [URI] Proxy URI
149-
-d, --metadata [FILE PATH] Metadata json file path
143+
--accessKey [ASSERTTHAT_ACCESS_KEY] Access key
144+
--secretKey [ASSERTTHAT_SECRET_KEY] Secret key
145+
--token [ASSERTTHAT_API_TOKEN] Jira API token (Server and DC only)
146+
--projectId <ID> Jira project id
147+
--jsonReportFolder [FOLDER PATH] Cucumber json files folder
148+
--runName [NAME] Test run name
149+
--jsonReportIncludePattern [PATTERN] Pattern for json file names
150+
--jql [JQL] JQL filter for Jira issues to update with test results
151+
--proxyHost [Host] Proxy Host
152+
--proxyPort [Port] Proxy Port
153+
--metadata [FILE PATH] Metadata json file path
150154
```
151155

152156
* Metadata file path is the path to a simple json file (no nesting) with some additional data about the run that can be optionally supplied.

bin/cli.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
#!/usr/bin/env node
1+
#!/usr/bin/env node
22
'use strict'
33
const program = require('commander');
44
const assertThat = require('../lib/assertthat-bdd');
55
const colors = require('colors');
66
const dateFormat = require('dateformat');
77

88
program
9-
.version('1.2.0')
9+
.version('2.0.0')
10+
.option('--projectId <ID>', 'Jira project id')
1011
.option('--accessKey [ASSERTTHAT_ACCESS_KEY]', 'Access key')
1112
.option('--secretKey [ASSERTTHAT_SECRET_KEY]', 'Secret key')
1213
.option('--token [ASSERTTHAT_API_TOKEN]', 'Jira API token (Server and DC only)')
1314
.option('--jiraServerUrl [URL]', 'Jira server URL e.g https://mycompanyjira.com')
1415
.option('--features', 'Download features')
1516
.option('--report', 'Upload report')
16-
.option('--projectId <ID>', 'Jira project id')
1717
.option('--jsonReportFolder [FOLDER PATH]', 'Cucumber json files folder')
1818
.option('--mode <mode>', 'Features to download', /^(automated|manual|both)$/i, 'automated')
1919
.option('--tags <tag-expression>', 'Cucumber tag expression for filtering scenarios', '')
@@ -83,12 +83,12 @@ if(program.report){
8383
if(!settings.projectId || (!settings.token && (!settings.accessKey || !settings.secretKey))){
8484
if(!program.projectId){
8585
console.log('');
86-
console.log(make_red('projectId (-i) option is required'));
86+
console.log(make_red('--projectId option is required'));
8787
console.log('');
8888
}
8989
if(!settings.token && (!settings.accessKey || !settings.secretKey)){
9090
console.log('');
91-
console.log(make_red('accessKey (-a) with secretKey (-s) or Jira API token (-t) option is required'));
91+
console.log(make_red('--accessKey with --secretKey or Jira API --token option is required'));
9292
console.log('');
9393
}
9494
program.outputHelp(make_red);

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@assertthat/assertthat-bdd",
3-
"version": "1.9.4",
3+
"version": "2.0.0",
44
"description": "Node.js module for integration with AssertThat BDD Jira plugin",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)