{"id":26965347,"url":"https://github.com/zafir100100/api-testing-on-jsonplaceholder-with-jest","last_synced_at":"2026-04-30T08:36:30.556Z","repository":{"id":285515361,"uuid":"955742723","full_name":"zafir100100/Api-Testing-on-JsonPlaceHolder-with-Jest","owner":"zafir100100","description":"This project provides unit tests for API endpoints using Jest, Axios, and Faker. It includes test suites for both PostController and UserController, which interact with a public API (https://jsonplaceholder.typicode.com).","archived":false,"fork":false,"pushed_at":"2025-04-10T09:39:16.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-05T04:12:50.791Z","etag":null,"topics":["api-testing","ci-cd","cjs","github-actions","jest","jest-html-reporter","nodejs","test-suite","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zafir100100.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-27T05:58:30.000Z","updated_at":"2025-04-10T09:39:20.000Z","dependencies_parsed_at":"2025-04-01T07:25:25.102Z","dependency_job_id":"20124024-cd4c-489f-84ee-ffa582a8a101","html_url":"https://github.com/zafir100100/Api-Testing-on-JsonPlaceHolder-with-Jest","commit_stats":null,"previous_names":["zafir100100/api-testing-on-jsonplaceholder-with-jest"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zafir100100/Api-Testing-on-JsonPlaceHolder-with-Jest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zafir100100%2FApi-Testing-on-JsonPlaceHolder-with-Jest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zafir100100%2FApi-Testing-on-JsonPlaceHolder-with-Jest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zafir100100%2FApi-Testing-on-JsonPlaceHolder-with-Jest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zafir100100%2FApi-Testing-on-JsonPlaceHolder-with-Jest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zafir100100","download_url":"https://codeload.github.com/zafir100100/Api-Testing-on-JsonPlaceHolder-with-Jest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zafir100100%2FApi-Testing-on-JsonPlaceHolder-with-Jest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018586,"owners_count":26086583,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-testing","ci-cd","cjs","github-actions","jest","jest-html-reporter","nodejs","test-suite","unit-testing"],"created_at":"2025-04-03T07:20:41.669Z","updated_at":"2025-10-14T12:53:33.684Z","avatar_url":"https://github.com/zafir100100.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Api Testing on JsonPlaceHolder with Jest\n\nThis project provides unit tests for API endpoints using **Jest**, **Axios**, and **Faker**. It includes test suites for both **PostController** and **UserController**, which interact with a public API (https://jsonplaceholder.typicode.com).\n\n## Video\n\nhttps://github.com/user-attachments/assets/28fcd228-3b74-4824-85a3-bd892fabf8d4\n\n## How to run this project\n```sh\n# Clone this project\n\n# Install dependencies\nnpm install\n\n# Run tests:\nnpm run test\n```\n\n## Test Scenarios\n### PostController\n1. **Get All Posts** - Verify that all posts are fetched correctly.\n2. **Get Post By ID** - Verify that a specific post is retrieved successfully.\n3. **Create a Post** - Ensure that a new post is created successfully.\n4. **Update a Post** - Verify that an existing post is updated correctly.\n5. **Delete a Post** - Ensure that a post is deleted successfully.\n\n### UserController\n1. **Get All Users** - Verify that all users are fetched correctly.\n2. **Get User By ID** - Verify that a specific user is retrieved successfully.\n3. **Create a User** - Ensure that a new user is created successfully.\n4. **Update a User** - Verify that an existing user is updated correctly.\n5. **Delete a User** - Ensure that a user is deleted successfully.\n\n## Dependencies\n```json\n\"devDependencies\": {\n  \"@faker-js/faker\": \"^9.6.0\",\n  \"axios\": \"^1.8.4\",\n  \"jest\": \"^29.7.0\",\n  \"jest-html-reporter\": \"^4.1.0\"\n}\n```\n\n## Screenshot (Jest HTML Report)\n\n![image](https://github.com/user-attachments/assets/7d66a077-0197-42d6-bcf2-46d06f167377)\n\n## Screenshot (Jenkins build report)\n\n![image](https://github.com/user-attachments/assets/71fdd9bd-e7c4-4bf5-b481-dd4c73dd96cf)\n![image](https://github.com/user-attachments/assets/15ec4d95-d2e3-4fb6-abe7-47f1a6d7a0a8)\n![image](https://github.com/user-attachments/assets/70202b67-be77-4ff9-877e-3c746b0735c8)\n![image](https://github.com/user-attachments/assets/f1b3924d-6036-474f-bcb8-f957ff5b2f0e)\n![image](https://github.com/user-attachments/assets/79a3ed48-43e0-4735-a692-14554950089f)\n![image](https://github.com/user-attachments/assets/e4d4b208-6728-4f3c-977a-09cc4041da0b)\n![image](https://github.com/user-attachments/assets/e2cf65c8-c1d7-4ac4-a050-9fea13a88ed6)\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzafir100100%2Fapi-testing-on-jsonplaceholder-with-jest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzafir100100%2Fapi-testing-on-jsonplaceholder-with-jest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzafir100100%2Fapi-testing-on-jsonplaceholder-with-jest/lists"}