8000 Meta Data section in the scenario JSON · Issue #207 · authorjapps/zerocode · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Meta Data section in the scenario JSON #207

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

Open
authorjapps opened this issue Feb 16, 2019 · 20 comments
Open

Meta Data section in the scenario JSON #207

authorjapps opened this issue Feb 16, 2019 · 20 comments

Comments

@authorjapps
Copy link
Owner
authorjapps commented Feb 16, 2019

Objective

  • This will help to capture any comments or useful information about authors or ticket(jira story) or a test category etc.

The section could look like below-

{
    "scenarioName": "Scenario Verify Person REST apis as well as DB layer",
    "ignoreStepFailures": false,
    "steps": [
        {
            "name": "get_enitity",
            "url": "/api/v1/people/visa/{id}",
            "method": "GET",
            "request": {
            },
            "assertions": {
                "status": 200
            }
        }
    ],
    "meta": {
        "authors": ["Emma", "Sidd", "Krish"],
        "tickets": ["ISSUE-519", "GT-312"],
        "categories": ["dev", "sit1", "sit2"],
        "others":["Runs every day", "Need to speak to Security team"]
        // and so on...
    }
}

  • Show these in the reports etc.
@aghorpade
Copy link
Collaborator

@authorjapps - metdata tag is associated with steps or should it be associated with scenario? I think if we associate metadata with scenario then it will have more significance and useful too in reporting.
E.g. Scenario - always comes with specific ticket and steps can have more than one steps so I think metadata should along with scenario.
Suggestions?

@authorjapps
Copy link
Owner Author
authorjapps commented Feb 27, 2019

@aghorpade , Yes, you are exactly right(scenario) 👍 . Updated the description. That was a typo.
Thanks for noticing it !

@authorjapps authorjapps added the feature-request New feature which can be introduced label Feb 27, 2019
@jneate
Copy link
Collaborator
jneate commented May 18, 2019

@authorjapps - Do you still require help with this issue? It's my first time contributing so I'll take your judgement about whether you feel I should tackle another issue first.

@authorjapps
Copy link
Owner Author
authorjapps commented May 20, 2019

Hello @jneate , thanks for your interest in contributing.
Seems like we will have to expand this issue a bit - will add more details soon. You can then pick it.

In the mean time(if you get chance)
You can look at this bug => #241
(This was definitely working earlier, but introduced in the recent releases... ie couple versions ago).

This is a minor bug - Somewhere the report builder is missing an entry.

Hope this will give a good start for the first issue !
👍

@tanvimehta
Copy link

@authorjapps Hello! Do you still need help fixing this issue? If so, I'd love to give it a shot. Thanks!

@nirmalchandra
Copy link
Collaborator
nirmalchandra commented Oct 15, 2020

Hello @tanvimehta , we will refine the ACs slightly and update you soon. Thanks for your interest ✌️

@priya1712d
Copy link

@authorjapps Hello team! Do you still need help with this issue? I am starting my open contribution journey, can jump in for other issues as well! Thank you in advance :)

@chaitanya1607
Copy link
chaitanya1607 commented Nov 24, 2023

@authorjapps Hello Team, I am new to open source contribution, I would like to explore this project. Can you help me set up this project in my local. Please share if there is any documentation. I checked the readme.md file but was not able to figure it out. Thank you in advance :)

@authorjapps
Copy link
Owner Author

@authorjapps Hello Team, I am new to open source contribution, I would like to explore this project. Can you help me set up this project in my local. Please share if there is any documentation. I checked the readme.md file but was not able to figure it out. Thank you in advance :)

@chaitanya1607, Thanks for your interest. Can you please use this page below to build and setup the project?
https://github.com/authorjapps/zerocode/blob/master/BUILDING.md

@DohaRamadan
Copy link
Contributor

@authorjapps Hello Team, I am new to open source contribution, I would like to explore this project. Can you help me set up this project in my local. Please share if there is any documentation. I checked the readme.md file but was not able to figure it out. Thank you in advance :)

@chaitanya1607, Thanks for your interest. Can you please use this page below to build and setup the project? https://github.com/authorjapps/zerocode/blob/master/BUILDING.md

Can I contribute to this? I'm new here and looking for something I can do.

@prayascoriolis
Copy link
Contributor

Hi @authorjapps

I've thoroughly reviewed the Zerocode source code and have gained a good understanding of its functionality. I am eager to contribute to this issue and believe I have a conceptual approach to solve it. However, I have a few questions to clarify:

Where does the metadata come from? Will it be present in the scenario JSON files, for example, in http-testing/src/test/resources/helloworld/hello_world_status_ok_assertions.json?
Looking forward to your guidance.

Thank you!

@prayascoriolis
Copy link
Contributor
prayascoriolis commented Aug 16, 2024

@authorjapps I've figure out the folowing steps to implement this feature:

  1. Implemented the unit test case associated with the issue which includes a java test file in http-testing and an assertions json file in resources which contains the meta data.
  2. Updated ScenarioSpec.java to include a meta field of type Map<String, List>.
  3. Modified ZeroCodeCsvReport.java to add new fields: metaAuthors, metaTickets, metaCategories, and metaOthers.
  4. Updated ZeroCodeCsvReportBuilder.java to include builder methods for the new meta data fields.
  5. For ZeroCodeExecResult.java: Added a new field private Map<String, List> meta; and corresponding getter/setter methods to store and retrieve meta data for each execution result.
  6. ZeroCodeReportGeneratorImpl.java: added logic to include meta data in the Extent report generation, CSV schema, and CSV row building processes, ensuring meta information is captured in both HTML and CSV reports.

Can i get this issue assigned?

prayascoriolis added a commit to prayascoriolis/zerocode that referenced this issue Aug 20, 2024
… in the scenario JSON (unit test java file and assertion json file added)
@authorjapps
Copy link
Owner Author
authorjapps commented Aug 21, 2024

@prayascoriolis , apologies for the delay in responding.
Thanks for picking this and trying to solutionize it.
Can you generate dummy/sample report and

  • attach the HTML file as a zip
  • attach few screenshots
    to get an idea or a preview of, how it's going to look to the end users after you have implemented?

Appreciate your effort!

@prayascoriolis
Copy link
Contributor
prayascoriolis commented Aug 21, 2024

@prayascoriolis , apologies for the delay in responding. Thanks for picking this and trying to solutionize it. Can you generate dummy/sample report and

  • attach the HTML file as a zip
  • attach few screenshots
    to get an idea or a preview of, how it's going to look to the end users after you have implemented?

Appreciate your effort!

Thank you for your patience and for the opportunity to work on this feature. I've implemented the meta data section in the scenario JSON and updated the report generation process. Though it's still ambigous on how to get html reports (I can only get json reports from target dir), I've created a sample report to demonstrate how it will look for end users.

  1. runner class (present in src/test/java/org/jsmart/zerocode/testhelp/tests/MetaDataTest/MetaDataTest.java)
  2. assertion json (present in src/test/resources/MetaDataTest/MetaDataTest.json)
  3. target json (present in target/zerocode-test-reports/Scenario - Get GitHub User Details with Metadataf30d7ce9-6f1f-44fc-be1f-0a239c61d445.json)
    reports.zip

@prayascoriolis
Copy link
Contributor
prayascoriolis commented Aug 22, 2024

@prayascoriolis , apologies for the delay in responding. Thanks for picking this and trying to solutionize it. Can you generate dummy/sample report and

  • attach the HTML file as a zip
  • attach few screenshots
    to get an idea or a preview of, how it's going to look to the end users after you have implemented?

Appreciate your effort!

If you're talking about zerocode-junit-interactive-fuzzy-search.html, this is the response i'm getting:

image

@prayascoriolis
Copy link
Contributor
prayascoriolis commented Aug 23, 2024

@authorjapps, I've also attached the final csv ouput, sorry for sharing it late as there was a bug in including meta data in csv reports.

You can see the new added column name including: metaAuthors, metaTickets, metaCategories and metaOthers, with their corressponding values filled in the row.

zerocode-junit-granular-report.csv

prayascoriolis added a commit to prayascoriolis/zerocode that referenced this issue Sep 1, 2024
… in the scenario JSON (unit test java file and assertion json file added)
@prayascoriolis
Copy link
Contributor

Hi @authorjapps ,

Have you had a chance to review the sample reports above? It would be great to revisit this issue whenever it's convenient for you.

Thanks for your time!

@authorjapps
Copy link
Owner Author

Hi @authorjapps ,

Have you had a chance to review the sample reports above? It would be great to revisit this issue whenever it's convenient for you.

Thanks for your time!

Sorry @prayascoriolis , couldn't get chance to look at it earlier.
🟢 "pass" scenario looking good. 👍

🔴 Can you attach a screenshot of the report how it looks when the scenario fails?

That's because, failed ones are important to look at, the "meta" section should help in that aspect, then it would be useful.

@nirmalchandra
Copy link
Collaborator

Also, @prayascoriolis , can you attach the PR(draft version if you've any) to this ticket?
(Do not worry even if it's not final one)

@prayascoriolis
Copy link
Contributor

Sure, @nirmalchandra @authorjapps, i've attached a zip file for reports where the scenario fails:
metadata_in _failed_test.zip

The required PR for this issue is here: #674

nirmalchandra added a commit that referenced this issue Oct 4, 2024
[Issue #207] Implementing Feature : Meta Data section (Scenario JSON)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants
0