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
Export HTML report with --export #165
Conversation
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.
Export is not yet implemented.
Open3 does not work with JRuby currently. See http://jira.codehaus.org/browse/JRUBY-5710.
Thanks. =) Can you give me some background so I understand why you want this? Before I dig into it, I want to understand what this provides or solves for you. |
Good question. In addition to running the tests, our Jenkins CI builds |
Can I ask why none of the existing build artifact/formats worked? eg. TeamCity, jUnit, or TAP? |
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 |
Getting this into 0.8.. thanks. =) |
This PR implements #121.
The Teaspoon reports can be exported as a static HTML page. This requires that
wget
is installed.To accomplish this, wget downloads from the teaspoon server the HTML and any assets the page needs to load.
The page (by default) is downloaded to ./teaspoon-export/suite_name/index.html.
Specs have been added to cover the new functionality.
This is also manually tested and working in my JRuby app, which mounts teaspoon at a nonstandard route (/web/teaspoon).
Cookie session storage is not available when viewing static html files via file://.
Therefore instead, the HTML reporter uses localStorage when available. If localStorage is not available, it falls back to using cookies.
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!