Skip to content

Conversation

officialasishkumar
Copy link
Member

@officialasishkumar officialasishkumar commented Sep 5, 2025

What has changed?

Please include a summary of the change.

Adds docs for dedup

This PR Resolves https://github.com/keploy/enterprise/issues/1398

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Documentation update (if none of the other choices apply).

How Has This Been Tested?

tested on: https://github.com/officialasishkumar/sample-go

how i test it was i created a sample application with 30 simple endpoints and created a script which picks randomly from all those 30 endpoints and the entire thing runs for 5000 curls. so in the end i just. checked whether only 30 are found unique or not

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.

@Copilot Copilot AI review requested due to automatic review settings September 5, 2025 13:34
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds documentation for the dedup feature specifically for Golang applications, replacing the previous multi-language documentation. The documentation has been streamlined to focus on Go-specific implementation and usage patterns.

Key changes:

  • Replaces Node.js, Java, and Python dedup documentation with Golang-specific instructions
  • Updates command examples to use the newer keploy test command with --dedup flag
  • Simplifies the workflow by removing language-specific middleware setup in favor of Go SDK import

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

```

### For Node Applications
### For Golang Applications

**1. Pre-requsite**
Copy link
Preview

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a spelling error in 'Pre-requsite'. It should be 'Pre-requisite'.

Suggested change
**1. Pre-requsite**
**1. Pre-requisite**

Copilot uses AI. Check for mistakes.

```

Add the the following on top of your main application js file (index.js/server.js/app.js/main.js) : -
Add the the following on top of your main application file : -
Copy link
Preview

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a duplicate word 'the the' which should be 'the following'.

Suggested change
Add the the following on top of your main application file : -
Add the following on top of your main application file : -

Copilot uses AI. Check for mistakes.

**1. Pre-requsite**

Put the latest keploy-sdk in your file : -
After this Run
Copy link
Preview

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sentence is incomplete and lacks proper punctuation. It should end with a period and could benefit from more context about what the dedupData.yaml file contains or its purpose.

Suggested change
After this Run
This will generate a dedupData.yaml file, which contains metadata and coverage information for each test case. This file is used in the next step to identify and remove duplicate tests.

Copilot uses AI. Check for mistakes.

Signed-off-by: Asish Kumar <[email protected]>
#### Example

Let's use the [expresss-mongoose](https://github.com/keploy/samples-typescript/tree/main/express-mongoose) application to test dedup feature. In our `src/app.js` file we need to have imported and initialized `@keploy/sdk` package, so now let's run the de-duplication command to check : -
Update the go build command in Dockerfile to add new flags which is required for deduplication (this is not required for native)
Copy link
Member

@gouravkrosx gouravkrosx Sep 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(this is not required for native)

It is required, that's why you mentioned below,

### For Python Applications

Deduplication works only on test mode there are no special instructions to record your tests.
where `./main` is the binary produced by doing `go build -cover -covermode=atomic -coverpkg=./... -o ./main .`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is confusing. Club this with the above, like for native and for docker.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@gouravkrosx
Copy link
Member

@officialasishkumar Please update the docs.

Signed-off-by: Asish Kumar <[email protected]>
@Sarthak160 Sarthak160 merged commit 20bdb9b into main Sep 7, 2025
1 check passed
@Sarthak160 Sarthak160 deleted the feat/dedup branch September 7, 2025 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants