auroralane7754

auroralane7754

Is There Any Way to Use VPN for API Testing in Dev Environments?

Hey developers :waving_hand:

I’m currently experimenting with various mobile VPN apps to simulate different network conditions for API testing.

Has anyone here used a VPN for API endpoint testing or staging environment access? I’m curious if it can help simulate remote location behavior or add a layer of encryption for dev debugging.

Would love to hear if you’ve tried this, especially in Node.js, Python, or Go-based environments.

Thanks in advance! :rocket:

Most Liked

Eiji

Eiji

Below are some points based on my Elixir experience:

  1. First of all I never heard about testing in dev environment. There was always a separate test environment that often has a completely different project configuration and test helpers that are available only for testing purposes.

  2. I never heard about simulating remote location. First of all the code responsible for sending requests and read responses is in some package/library and it should have it’s own tests, so therefore you should not be responsible at all for testing it.

  3. It’s rather not advised to rely on network connection. We have various of tools to avoid that. One example would be a request & response caching to the local drive, so tests needs to fetch specific page only once and after than every next call would be based on cached response. Alternatively you can use mocks and tell your code that you expect specific response, so you can focus on testing your app features and not the network.

Tests are often part of CI, so you are trying to slow down not only local development, but also verifying each commit in pull request. There are lots of possible network problems that you can’t predict and you really should not care about it at all.

Again usually you as a developer are testing not your network provider, but your application logic. It’s obvious that your application expects a working and stable connection to internet as otherwise it would not be able to serve pages. That’s why there is no reason and it’s why people are not testing it in every project.

However maybe you are in some very specific case. Without more context all we can do is to give a generic answers as we don’t know your use case. If it’s only about testing your API then usually nobody expects from you to write such tests and you usually should focus on testing your app features instead.

Where Next?

Popular Android topics Top

AndroidMan
I’ve tried signing up for Airnow as I used to do very well when they were Airpush, but i haven’t used them in years. I went through the s...
New
tauseeqafzal
Question: Android Developer → is there any way to read the .trash directory? → we can copy or save the file before delete ? #android...
New
ciger
I want to get a clone of Instagram APK But with a difference I want to define in this clone that, for example, it is not possible to acc...
New
Apoorv
I have made my version of browser on android platform.I have used chromium as base. I have build it successfully & but the logo or i...
New
Shadow
Good afternoon. Brief story: My institution has several nfc tags in building which have to be scanned with specific app built and used in...
New
AndroidDog123
I’m a developer working as a contractor for a company. I’m finding it confusing on how I should answer these questions? Has Google just b...
New
hasan10242048
There is an Android app. I just want to create two GRAPHS with CPU Runtime and Battery Consumption. It is as simple as this. I tried w...
New
AnfaengerAlex
Hello, I’m a beginner in Android development and I’m facing an issue with my project setup. In my build.gradle.kts file, I have the foll...
New
nihar-gingercube
We have developed a audio/video calling functionality using opentok sdk, now we want to integrate speech recognizer for transcribing voic...
New
Alan
I need to create an android app to receive contactless payment from my clients. how can I start that? My clients will be phisicaly in the...
New

Other popular topics Top

Devtalk
Reading something? Working on something? Planning something? Changing jobs even!? If you’re up for sharing, please let us know what you’...
1037 19435 386
New
PragmaticBookshelf
Design and develop sophisticated 2D games that are as much fun to make as they are to play. From particle effects and pathfinding to soci...
New
AstonJ
SpaceVim seems to be gaining in features and popularity and I just wondered how it compares with SpaceMacs in 2020 - anyone have any thou...
New
AstonJ
Inspired by this post from @Carter, which languages, frameworks or other tech or tools do you think is killing it right now? :upside_down...
New
dimitarvp
Small essay with thoughts on macOS vs. Linux: I know @Exadra37 is just waiting around the corner to scream at me “I TOLD YOU SO!!!” but I...
New
AstonJ
In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first: asdf plugin-upd...
New
PragmaticBookshelf
Author Spotlight Mike Riley @mriley This month, we turn the spotlight on Mike Riley, author of Portable Python Projects. Mike’s book ...
New
New
PragmaticBookshelf
Author Spotlight: Karl Stolley @karlstolley Logic! Rhetoric! Prag! Wow, what a combination. In this spotlight, we sit down with Karl ...
New
New