Kong / Kong/insomnia

Request Setting id is changed after export/import

Open
#7,756 4 comments 3 reactions 0 assignees View on GitHub
B-bug S-unverified
Dominant language
TypeScript
Stars
40k
Forks
2.4k
Avg merge
2d 13h
Merged PRs (30d)
61

Description

### Expected Behavior

After exporting Insomnia project as JSON with included unit test and later on import the project again it is expected the same test suite working as before export/import.

Namely, request id, e.g. req_eeb4e85ca9494caeb4b38ab1b4a54c9e. that is used in original tests should stay intact.

### Actual Behavior

Currently, after export/import Insomnia JSON project requests are getting new request id and at the same time unit tests are using request ids from original project. This resulting in failed tests with error: 'failed to find workspace' and test require update with new request id

### Reproduction Steps

1. Go to Export project option for a project with unit tests where request id is used while sending a request (e.g. const response = await insomnia.send('req_eeb4e85ca9494caeb4b38ab1b4a54c9e') ..)
2. Export as JSON file
3. As other user use Import option
4. 'Choose a File for import' option
5. Import previously exported JSON file
6. Open the request used in unit tests and go to Settings

Expected: Request Setting id is the same as before the export/import
Actual: Request Setting id is not the same as before the export/import

### Is there an existing issue for this?

- [X] I have searched the [issue tracker](https://www.github.com/Kong/insomnia/issues) for this problem.

### Additional Information

Export is done with Insomnia 9.3.0 and import with Insomnia 9.3.2.
Possibly related to https://github.com/Kong/insomnia/issues/7457

### Insomnia Version

9.3.2

### What operating system are you using?

Windows

### Operating System Version

Windows 10 Pro

### Installation method

Download from insomnia

### Last Known Working Insomnia version

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the project JSON Export and Import options, then trace how request IDs referenced by unit tests are handled. Reproduce the flow using a project with a test that calls insomnia.send with a request ID. Done means imported requests retain their original IDs and the existing unit tests still pass without updates.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.