Skip to content
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

Add Support for multiple Base URLs #29

Closed
Benuhx opened this issue Aug 2, 2019 · 5 comments
Closed

Add Support for multiple Base URLs #29

Benuhx opened this issue Aug 2, 2019 · 5 comments

Comments

@Benuhx
Copy link

Benuhx commented Aug 2, 2019

Feature suggestion:

Add Support for multiple Base URLs per Project. In each Action, one of the base URL should be selectable.

Use Case:

Imagine you want to test your Frontend and Backend, both have different URLs. You could set the Frontend URL as base URL and use absolute URL to test your Backend. You could also use absolut URLs for your Reset-API, too.

It would be better if we could set three Base URLs in our Project and select one from a list per Action. We would be able to switch our Environments (testing, staging, production...) more easily.
For now we have to replace the absolute URLs every time

@abainczyk
Copy link
Collaborator

Hi, there already is the possibility to assign multiple URLs to a project and choose, e.g. for a test execution, against which URL tests are executed. I get your point that frontend and backend may be on different servers and that there is the need for your suggestion.

The only issue I see here is how to deal with the import and export of symbols. I can imagine that on export, the absolute URL is exported (although specified as relative to a base URL) and on import, it is checked if there exists a URL in the project that is a prefix of the URL in the action and select this one. What do you think about this?

@Benuhx
Copy link
Author

Benuhx commented Aug 4, 2019

Would be great if you would implement it that way. Sounds really good :-)

@MazeChaZer
Copy link

MazeChaZer commented Aug 5, 2019

Having multiple base URLs would be great 👍
I'm not sure if the automatic conversion to absolute URLs is a good idea. It might be surprising for the user that, if he forgets to configure the base URLs, some URLs are suddenly absolute after import. Another problem I see is that the export results will be different depending on the configuration/environment. If I'm testing production and do an export, the export file will contain the URLs of the production environment. If I test locally, the URLs will be that of the local environment. That's why I would prefer that for each symbol the label of the base URL + the relative URL would be exported. If the base URL doesn't exist during import, an error would be thrown, saying which base URLs are missing. One requirement for this to work would be that the label of the base URL is a mandatory input. I would even go so far as to say that absolute URLs might not be needed at all. In most (if not all) cases it's better to use a base URL + relative path.

@MazeChaZer
Copy link

MazeChaZer commented Aug 5, 2019

Edit: This is not correct, nevermind.

One small additional point: Automatic conversion to absolute URLs would not allow for base URLs like http://localhost:3000/api/v1, after one export/import the base URL would become http://localhost:3000.

@abainczyk
Copy link
Collaborator

This is implemented with 1b6ea8d

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

No branches or pull requests

3 participants