You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Team! My Keploy tests just crashed. This is the report:
Versions
Name
Version
Node
v21.6.0
OS
Linux lima-default 6.1.0-21-cloud-arm64#1 SMP Debian 6.1.90-1 (2024-05-03) aarch64 GNU/Linux
Prisma Client
5.12.1
Query Engine
473ed3124229e22d881cb7addf559799debae1ab
Database
postgresql
Bun Version
1.1.4
Keploy
2.1.0-alpha23
When I am running Keploy test -c "bun --watch index.ts" i get error : -
🐰 Keploy: 2024-06-06T18:08:12Z INFO starting testfor of {"test case": "test-1", "test set": "test-set-6"}
thread 'tokio-runtime-worker' panicked at query-engine/connectors/sql-query-connector/src/database/operations/write.rs:194:22:
Could not figure out an ID in create
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Testrun failed for testcase with id: "test-1"
--------------------------------------------------------------------
+-------------------------------------------------------------------------------------------------------------+
| DIFFS TEST-1 |
+-------------------------------------------------------------------------------------------------------------+
| EXPECT HEADER | ACTUAL HEADER || -----------------------------------------------------+----------------------------------------------------- || Content-Length: [216] | Content-Length: [2935] ||||||| EXPECT BODY | ACTUAL BODY || -----------------------------------------------------+----------------------------------------------------- || { | { || - "user": { | + "error": " || - "createdAt": "2024-06-06T18:06:49.995Z", | Invalid `prisma.user.create()` invocation in || - "email": "isssalcupnamde@abc.com", | /workspaces/Blog-Website/services/user.service.ts: || - "id": 1, | 19:12 || - "name": "Yash", | 16 }); || - "password": "$2b$10$sORFubjTUt8Mt2k7vNqt4O3VV|
Initally, I thought the issue is with Prisma client but it seems that the keploy is not returning correct mocks to prisma which leads to the test failures. So i tried to run with --removeUnsedMocks, in this case out of 4 testcases randomly I'm able to get correct reponse.
1. start the database docker instance
2. install `keploy` with :- https://keploy.io/docs/server/installation/
3. keploy record -c "bun --watch index.ts"
4. make few post api call for creation like `signup`, `create-post`
5. stop the docker instance
6. keploy test -c "bun --watch index.ts"
The API Calls : -
## Create a User
curl --location 'http://localhost:4040/signup' \
--header 'Content-Type: application/json' \
--data-raw '{ "name":"Yash", "email":"isssalcupnamde@abc.com", "password":"1234"}'## Login
curl --location 'http://localhost:4040/login' \
--header 'Content-Type: application/json' \
--data-raw '{ "email":"isssalcupnamde@abc.com", "password":"1234"}'## Create a Post## You can get <TOKEN> from above curl response
curl --location 'http://localhost:4040/create-post' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data '{ "title":"Anime", "body":"AOT from quantum"}'
Environment
Release
Version
Local
Repository
keploy
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Current behavior
Hi Team! My Keploy tests just crashed. This is the report:
Versions
When I am running
Keploy test -c "bun --watch index.ts"
i get error : -Initally, I thought the issue is with Prisma client but it seems that the keploy is not returning correct mocks to prisma which leads to the test failures. So i tried to run with
--removeUnsedMocks
, in this case out of 4 testcases randomly I'm able to get correct reponse.Attempt#1
Attempt#2
Out of 20 attempts only attempt#2 had most acurrate and nearest results.
Steps to reproduce
Here's my repo:- https://github.com/darkin424/Blog-Website .
To reproduce please follow the steps below:-
The API Calls : -
Environment
Release
Version
Local
Repository
keploy
The text was updated successfully, but these errors were encountered: