Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Export HTML report with --export #165
This PR implements #121.
The Teaspoon reports can be exported as a static HTML page. This requires that
teaspoon --export="output_directory" teaspoon --export # output directory defaults to './teaspoon-export'.
To accomplish this, wget downloads from the teaspoon server the HTML and any assets the page needs to load.
Specs have been added to cover the new functionality.
Cookie session storage is not available when viewing static html files via file://.
Please give me any feedback you have. If you're happy with this implementation, I'd love to see this released as a new gem version soon. Thanks!
Using cookies does not work on localhost. Instead, use localStorage when available. If localStorage is not implemented, fall back to using cookies. Added a spec to ensure button toggles still work. Cookie storage is not tested in this feature spec because localStorage cannot be disabled using capybara.
Good question. In addition to running the tests, our Jenkins CI builds
I really like the HTML format that Teaspoon already provides. I considered
There's an important difference too in that the HTML export is an active
Mostly I just wanted artifacts that look and act like the Teaspoon web
I played around with this concept in the 0.8 branch, and I think we can do it more efficiently using phantomjs/selenium instead of wget.
I'll see if this can go in cleanly.
I had a question though -- you mention saving all the assets -- is this needed, or can they be re-served from the CI box? As in, I would rather just save the index.html and not all the assets that were loaded. I'll have to look at what you did there.
They cannot be re-served from the CI box. Every build has a different
As far as I can tell, phantom has no mechanism for downloading a page's