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:

First Post!

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
Aathithyan
I need to know how to implement outgoing call in my custom application instead of using default phone call app i need my own app call.
New
mpdizcashtag
Hi, this is my parrition informarion. A week ago I erased ‘system’ and now my hotpepper puya tablet bootloops. I have a gsi im trying to...
New
freerefills
I have an android app whereby notifications will fire and immediately leave the tray. This doesn’t always happen, it’s unpredictable they...
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
JesperBlom
Hi Hope it is a simple question :slight_smile: I am planning to use a new PC for making my enterprise app. Everything works perfect, b...
New
Rodion
Hello everyone, I recently started learning Kotlin and downloaded Android Studio, but after writing my first code and trying to run it, I...
New
Sadik
I’ve been hearing a lot about AI in mobile phones lately, and I’m kind of confused about how it’s different from the usual smart features...
New

Other popular topics Top

AstonJ
A thread that every forum needs! Simply post a link to a track on YouTube (or SoundCloud or Vimeo amongst others!) on a separate line an...
New
dasdom
No chair. I have a standing desk. This post was split into a dedicated thread from our thread about chairs :slight_smile:
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
Just done a fresh install of macOS Big Sur and on installing Erlang I am getting: asdf install erlang 23.1.2 Configure failed. checking ...
New
PragmaticBookshelf
Learn different ways of writing concurrent code in Elixir and increase your application's performance, without sacrificing scalability or...
New
PragmaticBookshelf
Build efficient applications that exploit the unique benefits of a pure functional language, learning from an engineer who uses Haskell t...
New
AstonJ
Was just curious to see if any were around, found this one: I got 51/100: Not sure if it was meant to buy I am sure at times the b...
New
PragmaticBookshelf
Programming Ruby is the most complete book on Ruby, covering both the language itself and the standard library as well as commonly used t...
New
hilfordjames
There appears to have been an update that has changed the terminology for what has previously been known as the Taskbar Overflow - this h...
New
PragmaticBookshelf
Author Spotlight: Peter Ullrich @PJUllrich Data is at the core of every business, but it is useless if nobody can access and analyze ...
New