Skip to content
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

detailed test step information in the test result #159

Open
EdStrickland opened this issue Mar 24, 2020 · 17 comments
Open

detailed test step information in the test result #159

EdStrickland opened this issue Mar 24, 2020 · 17 comments

Comments

@EdStrickland
Copy link
Member

HI,
our team is currently running BDD and wants to generate a cucumber report. I've written an Karma plugin but found that test steps information weren't in the result.
Is there anyway I could get such information? If not, is there a plan of expossing it?

@matz3
Copy link
Member

matz3 commented Mar 24, 2020

What do you mean with test steps?

@EdStrickland
Copy link
Member Author

@matz3 I mean the results of all the check points

@matz3
Copy link
Member

matz3 commented Mar 24, 2020

I'm still not sure what you mean.

This plugin offers two modes.

One is "script" which should not influence the way test results are recorded. This needs to be done in combination with a karma plugin like karma-qunit.

The other one is "html", which has built-in reporting for the QUnit framework, which also means no other test frameworks can be used in this mode. Here it could be that our code doesn't report results back to karma in a proper way, although I'm not aware of any known issues.

Are you able to provide a reproducible example project?

@EdStrickland
Copy link
Member Author

@matz3 I cannot provide our project, so I will need to write a demo. I can only explain the issue as mush as I can while I wrote it.

So when you write a karma-reporter plugin, you can rewrite the callback function onSpecComplete, which receives an object 'result' that gives you information of the test case that has been completed. However, the information doesn't contain which check point the test passed and which isn't.

@matz3
Copy link
Member

matz3 commented Mar 24, 2020

Got it, thanks 👍
I can have a deeper look into it once a demo/example is provided.

@EdStrickland
Copy link
Member Author

@matz3 I just looked in to the karma-ui5 source code. It seems in 'client/browser.js' the Qunit.log() won't send the result to karma. Is it possible that you provide the result out of the input 'details' and send it to karma?

@matz3
Copy link
Member

matz3 commented Mar 24, 2020

Currently it is collecting all errors and then posting them within QUnit.testDone to karma.
That's also what the karma-qunit plugin does.

Feel free to submit a PR.

@SAP SAP deleted a comment from EdStrickland Mar 24, 2020
@SAP SAP deleted a comment from EdStrickland Mar 24, 2020
@EdStrickland
Copy link
Member Author

@matz3 Hi, I submitted PR#161 but the pipeline seems not running, is it expected to happen?

@EdStrickland
Copy link
Member Author

#161

@EdStrickland
Copy link
Member Author

Hi,
Is anyone available to help to review my PR? It's been nine days since last updated.

@matz3
Copy link
Member

matz3 commented Apr 3, 2020

Sorry for the delay. I've added comments to your PR.
But before merging I would still like to fully understand this use case, also in order to properly document it.

@EdStrickland
Copy link
Member Author

Thanks for the review. I'm changing the code accordingly.
About the use case, would you like to know our scenario, or the scenario for the code in general?

@matz3
Copy link
Member

matz3 commented Apr 3, 2020

I would like to understand how the adopted report is used in combination with cucumber and why those assertions should also be reported as a "test".

@EdStrickland
Copy link
Member Author

Hi @matz3 ,
Sorry for the delay, I was busy working on another feature of our product.

We've just introduced Behavior Driven Development into our development process. During the development, integration tests, OPA tests, would be generated by 'feature files', which are files that describe the expected behaviors of the product written in Gherkin. In the files, the behaviors would be broken down into features, features broken down into several scenarios, and scenarios into steps.

For instance, a 'feature' of the app is Project Creation. A user can create different types of projects; hence there are various 'scenarios'. The actions that a user interacts with the app are 'steps'. Therefore In the integration tests, the assertions suggest the 'steps'.
When the integration tests are run, a cucumber report is expected to be generated, reporting how the tests are running. The information on 'steps' results are as important as 'scenarios' because it shows how the scenario is designed to function and makes showing the result makes it easier to do troubleshooting.
Therefore, we would like to report the result of the assertions when running OPA tests.

@matz3
Copy link
Member

matz3 commented Apr 15, 2020

Ok thanks, I got it now. Sounds reasonable to have this, although it should ideally also be added to the karma-qunit plugin.

@matz3 matz3 linked a pull request Apr 15, 2020 that will close this issue
@EdStrickland
Copy link
Member Author

Hi @matz3 , integration tests has been finished. Would you please take a look?

@jiangyichun
Copy link

Hi @matz3,

We also need this enhancement very much, do you think you can help adapt and merge the PR: #161? Thanks very much.

Best regards,
Eric Jiang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants