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

Prosper226
Hi guys, I’m trying to do multi ussd with java on android, I can’t do it. I looked at the documentation of telephonyManager on android, ...
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
Nevio
Hi, I made an android app and created a signature with keytool. I then bundled the signature in the apk. So, I was wondering if, wanting...
New
DAZ
Is it possible to develop an application that will generate NFC pulses even when the screen is off?
New
vsiPr
I am trying to develop an app which will make your smartphone act as a “keyboard”. I need it to send different symbols to another devices...
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
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
nihar-gingercube
We have developed a audio/video calling functionality using opentok sdk, now we want to integrate speech recognizer for transcribing voic...
New
Ujjwala
I’m developing an Android application in which I need to add functionality to automatically read a CSV file from a file manager, parse it...
New
Dysentery
I am trying to implement the PIN entry page using device’s TEE. I have acquired the confidential OEM Documentation. It have some C++ code...
New

Other popular topics Top

wolf4earth
@AstonJ prompted me to open this topic after I mentioned in the lockdown thread how I started to do a lot more for my fitness. https://f...
New
New
AstonJ
You might be thinking we should just ask who’s not using VSCode :joy: however there are some new additions in the space that might give V...
New
Rainer
My first contact with Erlang was about 2 years ago when I used RabbitMQ, which is written in Erlang, for my job. This made me curious and...
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
First poster: joeb
The File System Access API with Origin Private File System. WebKit supports new API that makes it possible for web apps to create, open,...
New
New
New
New
sir.laksmana_wenk
I’m able to do the “artistic” part of game-development; character designing/modeling, music, environment modeling, etc. However, I don’t...
New