-1

nosetests --processes=2 --process-timeout=1800 -v --nocapture -a=attr --attr=api src/tests/externalapi/test_accounts_api.py --with-html

doesn't work

console says: nosetests: error: no such option: --with-html Build step 'Execute shell' marked build as failure

1 Answers1

0

You can publish test results by adding post build action named “Publish JUnit test result report” in configure section. You will need to generate *.xml file with Nose, tell Jenkins what is the name of that file and Jenkins will be able to interpret it and display it in nice looking form.

Option which is interesting for you instead of --with-html is --with-xunit.

Documentation for this option is available here.

machnic
  • 2,304
  • 2
  • 17
  • 21
  • that i have already implemented what i need is jenkins to create HTML report using nose-htmloutput 0.6.0 – Varun Gogia Sep 01 '16 at 05:55
  • Ok, that's a different story. I've never used this plugin, because html report published by Jenkins was good enough for me, but now I installed it out of curiosity using `pip-install nose-htmloutput` and it works like a charm by simply adding `--with-html`. Html report is created in the same folder as *.xml file with the results and it's called 'nosetests.html'. It may look like a silly question, but... are you sure that you have that plugin installed on the machine where you have your Jenkins running? – machnic Sep 01 '16 at 10:35
  • are us using Python 2.7.10 or Python 3 actually even locally i installed the pip-install nose-htmloutput then i ran nosetests --processes=2 --process-timeout=1800 -v --nocapture -a=attr --attr=accounts_api C:\Users\vgogia\Documents\GitHub\python-investor-web-exp\src\tests\externalapi\test_accounts_api.py --with-html then empty HTML report is generated – Varun Gogia Sep 01 '16 at 12:24
  • In my case the whole content of the report was in the right place and the only thing I added was `--with-html`. My guess is that probably you are doing something wrong with the rest of attributes which you are passing to Nose and your tests are not executed properly. Thus your report is empty. – machnic Sep 01 '16 at 12:46