juspay/hyperswitch

[CYPRESS_FRAMEWORK] Pass `x-request-id` in reports

Open

#5,911 建立於 2024年9月16日

在 GitHub 查看
 (6 留言) (0 反應) (1 負責人)Rust (4,676 fork)batch import
E-mediumgood first issuehacktoberfesthelp wantedjavascript

倉庫指標

Star
 (42,690 star)
PR 合併指標
 (平均合併 6天 22小時) (30 天內合併 213 個 PR)

描述

Description:

Cypress is the testing framework that Hyperswitch is using to run automated tests. Having good grip on Javascript to work on Cypress is a must.

For every request made from Hyperswitch, x-request-id will be generated. This gives access to the developers to access detailed logs about the exchange (request and response) that includes connector's response as well.

At present, Cypress tests generate report in both html as well as json format. They do provide some info about a test that is run but they lack x-request-id.

[!NOTE] Cypress tests do print the x-request-id in cli logs.

With that said, the task is to inject / introduce x-request-id in reports that are generated.

Getting started:

Go through the README for guidelines on file structure, formatting and instructions on how to set up and run Cypress.

In short:

cd cypress-tests
npm ci

Possible implementation:

  1. Cypress mochawesome reporter is the plugin that is used to generate Cypress reports and is introduced in Cypress configs
  2. You might want to write a custom reporter to accommodate this change by adding a afterHook in Cypress configs that can fetch the x-request-id and pass that into the report through the custom reporter
  3. Code wise, x-request-id is printed into cli_log by the function here

Reference:

Additional info:

  • Language: Javascript
  • Difficulty: Medium

Submission Process:

  • Ask the maintainers for assignment of the issue, you can request for assignment by commenting on the issue itself.
  • Once assigned, submit a pull request (PR).
  • Maintainers will review and provide feedback, if any.
  • Maintainers can unassign issues due to inactivity, read more here.

Refer here for Terms and conditions for the contest.

貢獻者指南