ArchGPT / insomnium

Insomnium is a fast local API testing tool that is privacy-focused and 100% local. For testing GraphQL, REST, WebSockets and gRPC. This is a fork of Kong/insomnia
MIT License
3.33k stars 125 forks source link

Dynamic values don't hold after export and import #98

Open bjsvedin opened 8 months ago

bjsvedin commented 8 months ago

Expected Behavior

When I export a collection with dynamic values that point to the response of a request, I expect the import to link that value to the new request in the new collection.

Actual Behavior

It doesn't update it to use the new request. If you export and import into the same Insomnium instance it will act like that connect was kept, but it will actually be pointing at the original request from the original collection, not the new collection. If this is a different system entirely ALL of the dynamic variables will be broken and need to be re-established.

Reproduction Steps

In the same Instance:

Create two requests in a new collection. In the first request send a json call to "https://echo.free.beeceptor.com" and it will echo the http response back as json. In the body of the second request use the attribute "parsedBody" from the response in the first request and send it. The response will be the same as the first. Export the collection to a file. Import that file back into Insomnium. In the new collection, send a new json body in the first request that differs from the original request. In the new collection, send the second request without altering it and you will get back the value from the original first request.

In a different Instance:

Use the same 4 steps from above up to and including exporting the collection to a file. Copy the export to a new machine with Insomnium and import the file. Send the first request. In the second request the dynamic value will not work. It will be red and if you try to send it you'll get an insomnium popup with an error about resolving the value.

Is there an existing issue for this?

Additional Information

I have looked at issue #60 and #42 but they don't state this issue specifically. They are discussing environment variables, and import of the base, but not for inlined variables like I have mentioned.

Insomnium Version

v0.2.3-a

What operating system are you using?

Windows

Operating System Version

Windows 11 Pro 22621.2428

Installation method

Using .exe from github release.

Last Known Working Insomnium version

Unknown. This has never worked, even with Insomnia.

skmpowdjy commented 8 months ago

Same issue here (and in original Insomnia) on Mac OS. Would be awesome if this could be fixed :) It makes sharing collections a huge pain.