Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CLI report #984

Closed
chris-rock opened this issue Aug 26, 2016 · 4 comments
Closed

Improve CLI report #984

chris-rock opened this issue Aug 26, 2016 · 4 comments
Milestone

Comments

@chris-rock
Copy link
Contributor

Description

After we merged #946 the reporting has been improved a lot. Still we have to cover some cases, where the report is not displaying all values properly:

screen shot 2016-08-26 at 10 18 49 am

### InSpec and Platform Version

0.32.0

Replication Case

# you add controls here
control "tmp-1.0" do
  impact 0.7
  title "Create /tmp directory"
  tag data: "temp data"
  tag "security"
  ref "Document A-12", url: 'http://...'

  describe file('/tmp') do                  # The actual test
    it { should be_directory }
    it { should_not be_directory }
  end
end

control "tmp-1.1" do
  impact 0.7
  title "Second test"
  desc "An optional description..."

  describe file('/tmp') do
    it { should be_directory }
  end
end

describe file('/tmp') do
  it { should be_directory }
  it { should_nota be_directory }
end

# you can also use plain tests
describe file('/tmp') do
  it { should be_directory }
end

Possible Solutions

Update the reporter to capture those cases.

@vjeffrey
Copy link

@chris-rock what would the desired output be for the it { should_nota be_directory } case? marked as skipped and have some kind of error message?

@vjeffrey
Copy link

vjeffrey commented Aug 29, 2016

for syntax errors: mark as failed and print exception message. controls output: single passed test case missing checkmark

@chris-rock
Copy link
Contributor Author

We have to issues:

  • Exception messages are not displayed
  • success messages do not get a checkmark, if a control includes only one test

@vjeffrey
Copy link

vjeffrey commented Sep 1, 2016

screen shot 2016-08-31 at 11 00 23 pm

on vj/fix-cli-report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants