Skip to content
This repository has been archived by the owner on Jan 14, 2019. It is now read-only.

Node JS: how to generate static html report using allure-results programmatically? #896

Closed
rahulmr opened this issue Jan 6, 2017 · 5 comments
Milestone

Comments

@rahulmr
Copy link

rahulmr commented Jan 6, 2017

I have generated allure-results using wdio-allure-reporter which are number of json files and 1 suite xml file. Is there any report generator which can be used programmatically in NodeJS? Actually, I want to generate the reports in a single html file in the onComplete function of wdio.conf.js file. Preferably, do not want to use allure command line as it won't be platform independent.

Thanks in advance for providing a probable solution.

@vania-pooh
Copy link
Contributor

  1. Allure command-line is a Java application. It's platform independent.
  2. You may want to use plugins for Jenkins, Teamcity or Bamboo.
  3. Otherwise you need to implement Javascript report generation logic. It consists of two stages - converting XML files to Alluire JSON files and unpacking Allure face. Do you need more details about the process?

@just-boris
Copy link
Contributor

@rahulmr have you tried to use https://www.npmjs.com/package/allure-commandline?

npm install allure-commandline

@rahulmr
Copy link
Author

rahulmr commented Jan 10, 2017

Yes, already tried but the problem it generates many folders and one html file. They should be serve through a web server. When I open the generated html file directly, the components are not loaded. Might be due to browser issue which is not supported that way of viewing the html file. Is it possible to get a single html file ?

@vania-pooh
Copy link
Contributor

@just-boris
Copy link
Contributor

@rahulmr there is no any chance to see Allure without serving files somehow.

This is foundational thing because our report is a single-page-app, that uses a lot of AJAX, which is not possible for static files.

@sseliverstov sseliverstov added this to the 2.0 milestone Jan 24, 2017
@baev baev closed this as completed Feb 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants