Comments (10)
@Vishnu1067 - sure. will check this out as well.
from html-report.
Waiting for this release. I am also having folder structure as
specs
- teamName
- regression
- ui
- file.spec
-api
- file.spec.
would be nice if it accepts for any folder structure under specs.
from html-report.
@Vishnu1067 I tested this branch (251_nested_dir_images). The bug has been fixed. I downloaded the source code and compiled myself. Let me know if you need the zip file for your machine. I hope they release soon.
from html-report.
I have checkout this branch (251_nested_dir_images)
and compiled go run build/make.go && go run build/make.go --install
and now gauge -v
Gauge version: 1.0.7
Plugins
-------
html-report (4.0.10)
java (0.7.4)
screenshot (0.0.1)
spectacle (0.1.3)
xml-report (0.2.1)
When i use ICustomScreenshotGrabber, screenshots are showing in the report (deprecated ICustomScreenshotGrabber)
public class CustomScreenGrabber implements ICustomScreenshotGrabber {
@Override
public byte[] takeScreenshot() {
return ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
}
But if i use CustomScreenshotWriter, screenshot not placed in images and it is crashed.
public class CustomScreenGrabber implements CustomScreenshotWriter {
@Override
public String takeScreenshot() {
return ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE).getName();
}
Correct me if i am doing anything wrong here.
Also not sure i must put env gauge_screenshots_dir
as per this PR
getgauge/gauge-java#333
from html-report.
@sriv can you please consider to fix this issue or am i missing something? Please advise.
I have checkout this branch
(251_nested_dir_images)
and compiledgo run build/make.go && go run build/make.go --install
and now gauge -v
Gauge version: 1.0.7 Plugins ------- html-report (4.0.10) java (0.7.4) screenshot (0.0.1) spectacle (0.1.3) xml-report (0.2.1)
When i use ICustomScreenshotGrabber, screenshots are showing in the report (deprecated ICustomScreenshotGrabber)
public class CustomScreenGrabber implements ICustomScreenshotGrabber { @Override public byte[] takeScreenshot() { return ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES); }
But if i use CustomScreenshotWriter, screenshot not placed in images and it is crashed.
public class CustomScreenGrabber implements CustomScreenshotWriter { @Override public String takeScreenshot() { return ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE).getName(); }
Correct me if i am doing anything wrong here.
Also not sure i must put env
gauge_screenshots_dir
as per this PR
getgauge/gauge-java#333
from html-report.
@Vishnu1067 - your custom screengrabber imlpementation is incorrect. You need to write the file and then return the path. The location of screenshot should be read from gauge_screenshots_dir
. Something like this:
// Return a screenshot file name
@Override
public String takeScreenshot() {
TakesScreenshot driver = (TakesScreenshot) DriverFactory.getDriver();
String screenshotFileName = String.format("screenshot-%s.png", UUID.randomUUID().toString());
File screenshotFile = new File(Paths.get(System.getenv("gauge_screenshots_dir"), screenshotFileName).toString());
File tmpFile = driver.getScreenshotAs(OutputType.FILE);
try {
FileUtils.copyFile(tmpFile, screenshotFile);
} catch (IOException e) {
e.printStackTrace();
}
return screenshotFileName;
}
I tried this and am able to see the screenshots in all pages (even the nested ones).
PS - the docs mention this: https://docs.gauge.org/writing-specifications.html?os=windows&language=java&ide=vscode#taking-custom-screenshots
from html-report.
Ok thank you @sriv. I will try it out
from html-report.
@sriv It works, Thanks.
from html-report.
@sriv When will be expected to release this fix?
from html-report.
The fix is being tested, please watch out for the PR #253 to be merged.
from html-report.
Related Issues (20)
- Customize Gauge HTML Report to have Platform, Browser HOT 3
- Report screenshot failures clearly on report HOT 1
- Add ability to see failed retries in html-report (using gauge native retries) HOT 6
- Add ability to see failed retries details HOT 1
- Handle Web Storage API Restrictions HOT 4
- Report doesn't display results when webdriver throws exception HOT 3
- screenshot container should be removed when `screenshot_on_failure` set to false
- TOTAL SCENARIO count does not match passed+failed+skipped.
- All the failed tests are reported in a successful state in the HTML report with Appium HOT 5
- Feature Request: Render csv as html
- Sorting Specs by name not retained when a spec is clicked HOT 2
- Sorting order of Scenarios not retained in Spec display HOT 3
- Gauge crashes after encountering an exception HOT 1
- Lack of space between the start and the end in the title and steps of scenarios
- Timestamp to show order of operation
- Retries included in report
- Reports generated with path containing space character and it prevents one click opening HOT 2
- **Add a scroll to the html reporting for the shared data table in the scenario of the same specification, so that it adapts to a standard display** HOT 1
- bsdthread_register error on Mac OS 12.x and 13.x with Intel CPU HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from html-report.