Comments (5)
I suspect that the error in your project is getting handled somewhere and thus the project is not propogating an exception to gauge (which is something gauge needs to identify a failure, ex. assert will throw an exception on failure which gauge will analyse and report_
from html-report.
This is not a problem with html-report. Rather it seems that your tests are not getting marked as failed
when the exceptions occur.
if you notice your console log, you'll see gauge sees all scenarios as passed.
Can you share what a sample project? or at least what is the implementation of the step where the error occurs?
from html-report.
Hi, some notes below:
The first thing a developer will think about is to handle errors with try / catch. You think that it is possible of an evolution to manage it differently ?
The norm AFAIK is that if you want the error to propagate, then you rethrow the exception in the catch
block. Most testing libraries rely on exceptions to ascertain failure conditions. Take for example the junit assert. If you were to wrap assert
in a try/catch, you'd notice that the tests are reported as passed even when the assert fails.
Even when I use the Custom messages in reports, it displays the error message in a step that is green (color) successful, which is paradoxical...
Gauge.writeMessage
is a function that takes a string and puts it into the report. It has no sematic knowledge of what the string represents. The green colour is indicative of the fact that the scenario passed (i.e. no exceptions were passed on).
Gauge, by design, is framework agnostic and it relies on users to feed it the right inputs. I can understand this being a learning curve, but unless we tune Gauge to certain use cases, it will be tough to get this intelligence IMO. If you have ideas, please raise issues! It will be most interesting and helpful.
The reporting must be understandable by a non-technical person
I agree with this principle, but it is upto the individual writing the tests to bubble up the right contextual, domain specific message to the report.
from html-report.
Thank you for your quick response !
I put the same code in a new project created via gauge init, and suddenly the code works fine, it shows the error in the reporting.
Yet it is the same code, I do not understand the problem.
I am analyzing the structure of my old project and checking it with the pom file to find the cause of the problem.
Log in the new project for the same code:
from html-report.
Thank you very much for your tip, you are the best.
Eeffectively, I just deleted the try / catch, suddenly it works fine with a nice screenshot from my smartphone app. I'm very happy :)
It's been over a 2 weeks since I have been on this problem, I never thought that if I handle the error by myself, it will be ignored by .
I think you have to remember to take into account the errors handled by try/catch or throw.
The first thing a developer will think about is to handle errors with try / catch. You think that it is possible of an evolution to manage it differently ?
Here is an example of a method handled by a try catch :
Even when I use the Custom messages in reports, it displays the error message in a step that is green (color) successful, which is paradoxical, as following :
I want to display short messages with the Custom messages, but in failed steps like in "screenshot 0" in red color.
screenshot 0:
I prefer to display a short readable error from "screenshot 1" on my reporting html, than to have a long log like the one in the "screenshot 2" of the reporting .
The reporting must be understandable by a non-technical person (not a developer) !
screenshot 1 (Exception handled by try / catch) 👍 :
screenshot 2 (Exception handled by default by language, which is not understandable by a non-technical person)
from html-report.
Related Issues (20)
- Images not showing up for nested spec directories HOT 10
- 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.
- 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.