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

big_f
I am making an app with Nativescript-vue and I would like to have an event where I click on an icon and then a new box appears. For the i...
New
husaindevelop
Inside our android webview app, we are trying to paste the copied content from another app eg (notes) using navigator.clipboard.readtext ...
New
Joakins
Android studio displayed access is denied during gradle build C:\Program Files\Java\jdk1.8.0_251\native\68d5fa5c4cc2d200863cafc0d521ce42...
New
mfaamir
Dear Sir, I am a beginner in Android App development and I am currently trying to establish a connection between my Android Studio Java ...
New
sonit
Display is not working properly in landscape mode when projection given by pixel 7 version 13 in case of video play by youtube app after ...
New
faust
Honest question, do companies still use Java for their new android apps? I thought everybody was using Kotlin these days.
New
Creator
Could you please help me to find the problem why startScan function is not executed. By debugging after @RequiresBluetoothLocationPermiss...
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
auroralane7754
Hey developers :waving_hand: I’m currently experimenting with various mobile VPN apps to simulate different network conditions for API t...
New

Other popular topics Top

brentjanderson
Bought the Moonlander mechanical keyboard. Cherry Brown MX switches. Arms and wrists have been hurting enough that it’s time I did someth...
New
New
PragmaticBookshelf
Build highly interactive applications without ever leaving Elixir, the way the experts do. Let LiveView take care of performance, scalabi...
New
AstonJ
If you get Can't find emacs in your PATH when trying to install Doom Emacs on your Mac you… just… need to install Emacs first! :lol: bre...
New
DevotionGeo
I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New
New
AstonJ
If you’re getting errors like this: psql: error: connection to server on socket “/tmp/.s.PGSQL.5432” failed: No such file or directory ...
New
AstonJ
This is a very quick guide, you just need to: Download LM Studio: https://lmstudio.ai/ Click on search Type DeepSeek, then select the o...
New
AstonJ
Curious what kind of results others are getting, I think actually prefer the 7B model to the 32B model, not only is it faster but the qua...
New
mindriot
Ok, well here are some thoughts and opinions on some of the ergonomic keyboards I have, I guess like mini review of each that I use enoug...
New