Comments (5)
- What about testing against real envs with the same suite? IMO the tests should be able to mingle between envs easily. (also for CI/CD)
- In the case your service is behind a3rd party gateway service, you can mock the header.
from nodejs-integration-tests-best-practices.
What about testing against real envs with the same suite? IMO the tests should be able to mingle between envs easily. (also for CI/CD)
That's a great feature 🔥🚀 which is not necessarily related to auth. I guess it's feasible for some of the tests (black-box tests) as those who are utilizing test doubles or alter the config (grey-box tests) won't be able to run against remote env. How can we separate between the two? Probably need to tag the black-box tests + make the URL inference dynamic, not always work against localhost rather make this configurable. I would also add this to our features list in the home page.
In the case your service is behind a3rd party gateway service, you can mock the header.
Not sure I followed, could you clarify?
from nodejs-integration-tests-best-practices.
@goldbergyoni For example, if you use Apigee, the authorization step happens before the request get to the service, so you can just send a mocked Authorization header
from nodejs-integration-tests-best-practices.
@mikicho What is a mocked auth header? I guess you refer to API gateways which accept a valid token
I'm asking to ensure I don't miss a bit
from nodejs-integration-tests-best-practices.
@goldbergyoni mocked auth header is jwt for example. If you sever doesn't verify it (because this is happening before the request hit your sever) you can send whatever value you want
from nodejs-integration-tests-best-practices.
Related Issues (20)
- Make TOC and recipe list (homepage) clickable
- Write last 3 best practices
- In Collab section - Write about yourself
- Create contributors table
- There are 2 api.js
- Create my-first-pr issues HOT 2
- MQ best practices HOT 2
- Create stale bot
- Create contributors bot
- Add more mySQL optimization flags
- Close sequalize connection in stopWebServer HOT 1
- Node Best
- Why mark `async` in the callback of `beforeAll`? HOT 1
- Nock with remote swagger HOT 1
- Lazy watch plugin
- VSCode snippets for integration tests
- DB cleanup recepie
- Create Fastify example HOT 1
- Put code examples
- put collaborators section HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodejs-integration-tests-best-practices.