Comments (1)
Basic Testing:
- Start by testing the core functions of Keploy, like verifying if the provided commands are correct and detecting errors in the user's command, such as port conflicts or non-zero exit commands.
Advanced Testing:
- Move on to more advanced testing, focusing on the "record and test" feature, which is the heart of Keploy.
Method:
- Begin by recording test cases and mocks for your application.
- Test the "keploy record" command with the "keploy test" command. It looks like this: keploy record -c "keploy test -c './sampleApp'". The "keploy record" tool records the same APIs that "keploy test" uses with the sample application.
- When your sample app makes an external call, "keploy record" captures the mocks sent by "keploy test." "Keploy test" reads the recorded mocks and sends them back. This way, no database is needed while testing the record feature of Keploy.
Initial Challenges:
- "Keploy record" couldn't run the "keploy test" command initially due to issues with environment variables. This was fixed by explicitly setting the environment for the command.
- Managing test epbf hooks was a bit tricky, but it's crucial to note that the hooks are executed in the order they were loaded, with record hooks running before test hooks.
- It's important to filter out the PID of the "keploy test" binary in "keploy record" to avoid capturing external calls made by "keploy test".
- Adjust the redirect mechanism so that the flow goes through "keploy record proxy" before "keploy test proxy." Initially, it was going directly to "keploy test proxy," preventing proper recording of tests and mocks. This issue was resolved by adding checks in the ebpf hooks.
This approach allows us to make significant advancements in our testing framework
from keploy.
Related Issues (20)
- [bug]: navbar broken for larger screens in keploy-docs HOT 8
- [bug]: remove serve package completely
- Add a timer to the keploy recorder HOT 4
- [docs]: Implementation of Discussed Feature from YouTube Video in 'keploy' Repository HOT 2
- [feature]: Add server binary to .gitignore HOT 1
- [docs]: update twitter logo HOT 2
- [bug]: Test mode for spring-pet-clinic is failing due to Postgres HOT 1
- [bug]: Bug in display of differences for a object response HOT 2
- [docs]: add a log for uploading a test-report to hosted keploy ui HOT 1
- [bug]: mongo fails to get mock in docker for mac HOT 2
- [feature]: Ability of Keploy to Modify Dockerfile Entrypoint and Introduce Delay HOT 11
- [feature]: Dynamically include Keploy's custom CA in the application container. HOT 3
- [bug]: Failed to stop/remove the docker container
- [bug]: index out of range when doing pass through port HOT 1
- [feature]: race flag in CI pipeline HOT 3
- [feature]: Would be great to re-record certain test-set or testcases
- [bug]: only add sudo to docker alias for linux if required HOT 2
- [bug]: Update the docker installation script
- [bug]: Test reports have incomplete/missing information
- [feature]: create a simple testcase for mattermost
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 keploy.