Strider-CD / strider-blanket

8 stars 2 forks source link

Reporting in Strider #2

Open ghost opened 9 years ago

ghost commented 9 years ago

Hi,

This is probably arising from my coming back in to the Unix environment after 20 years.

I've set up code coverage and it does work but the reporting in the strider UI is not coming through as expecting. All I can get is the json coverage appearing as raw output in the test stage of the build pipeline and not the nice reporting that is displayed in the home page here.

My comment is custom as such -> mocha -r blanket -R json-cov ./lib/test/PlayerManagementServiceTests.js

This goes to stdout (I think) but strider is not picking it up.

Some help please :)

Nick

skellertor commented 7 years ago

I am have having a similar issue. Strider is not displaying it on the build page. Was there ever a resolution to this?

knownasilya commented 7 years ago

No, but probably nobody looked. I'll have a look this week.

oliversalzburg commented 7 years ago

Just FYI, the plugin has not been maintained for almost 3 years.

That being said, the plugin expects to run the test command itself. It will not parse output produced by commands run from other plugins.

skellertor commented 7 years ago

@oliversalzburg let me see if I understand you correctly. In strider, If I import my project using the bitbucket plugin and select the nodejs option, that plugin uses it's own bash script to prepare the environment, clone the repo, and run the tests. Will it not parse the test output because the nodejs plugin is using npm test instead of strider-blanket calling mocha -r blanket -R json-cov ?

knownasilya commented 7 years ago

I think you can set the node plugin to no test, and then have blanket run npm test which returns a json-cov output.

skellertor commented 7 years ago

@knownasilya Great! I got blanket to actually run the tests... but there is not output to the build page. The console is showing [output suppressed]

screen shot 2016-08-18 at 7 44 58 am
skellertor commented 7 years ago

It looks like the html is inserted into the dom but is hidden due to data.coverageStatus === 'pending'. Why would it be pending? could the configuration be wrong?

knownasilya commented 7 years ago

Might be a bug..

skellertor commented 7 years ago

I was going through the code and it looks like when strider spawns a process to run mocha -r blanket -R json-cov, the process exits with an exitcode of 1. It then returns to strider-blanket an error at line 36 of worker.js. It never can properly populates the html template because it returns due to the error. It seems that it really isn't a strider-blanket .... Why would that process return an exitcode of 1. It just runs 'mocha -r blanket -R json-cov'

skellertor commented 7 years ago

It installs blanket in the prepare method and the reporter json-cov is working.