{"id":18728261,"url":"https://github.com/gunnar-miklis/learn-testing","last_synced_at":"2025-08-11T16:06:15.678Z","repository":{"id":192244238,"uuid":"685549573","full_name":"gunnar-miklis/learn-testing","owner":"gunnar-miklis","description":"Practice. Learn. Improve. (Intro into: Testing, DevOps, CI/CD. Unit-, Integration- and End-to-End Tests)","archived":false,"fork":false,"pushed_at":"2024-07-11T14:59:13.000Z","size":91,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-19T20:31:47.117Z","etag":null,"topics":["cicd","cypress","devops","end-to-end-testing","integration-testing","jest","unit-testing","vitest"],"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/gunnar-miklis.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}},"created_at":"2023-08-31T13:33:53.000Z","updated_at":"2024-07-11T14:59:16.000Z","dependencies_parsed_at":"2024-07-11T17:15:42.700Z","dependency_job_id":"e5898575-e519-4228-b338-4079116a8a72","html_url":"https://github.com/gunnar-miklis/learn-testing","commit_stats":null,"previous_names":["gunnar-miklis/intro-to-testing","gunnar-miklis/learn-testing"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gunnar-miklis/learn-testing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunnar-miklis%2Flearn-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunnar-miklis%2Flearn-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunnar-miklis%2Flearn-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunnar-miklis%2Flearn-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gunnar-miklis","download_url":"https://codeload.github.com/gunnar-miklis/learn-testing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunnar-miklis%2Flearn-testing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269915595,"owners_count":24495742,"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-08-11T02:00:10.019Z","response_time":75,"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":["cicd","cypress","devops","end-to-end-testing","integration-testing","jest","unit-testing","vitest"],"created_at":"2024-11-07T14:20:21.844Z","updated_at":"2025-08-11T16:06:15.619Z","avatar_url":"https://github.com/gunnar-miklis.png","language":"JavaScript","readme":"# Intro in Testing\n- DevOps\n- CI/CD\n- Testing\n- Example\n\n\n\u0026nbsp;\n## DevOps\n➡️ Focus on People, Processes and Tools for the benefit of business agility.\n\n1. **💡 Idea**, Userstories\n2. **`\u003c/\u003e` Code**, Programming the Idea \n3. **⚙️ Build**, Executables\n4. **📦 Deploy**, Runtime Environment\n5. **🔍 Manage**, Production (and Testing)\n6. **📈 Learn**, Continuous Improvement\n\n   \n\n\n\u0026nbsp;\n## CI/CD\n➡️ **Build. Test. Deploy.** Continuous integration, automated testing and deployment.\n- Purpose: to avoid “merge hell”.\n- Typically done by a CI/CD server/pipeline.\n- Benefit: always have a testable and functional build.\n\n### 1. CI – Continuous Integration\n➡️ Commit code to a shared repo frequently.\n- Commit, push/pull code constantly.\n- Each commit triggers automated (unit) tests.\n  \n### 2. CD – Continuous Delivery/Deployment\n➡️ Deploy code automatically.\n- If the CI tests are successful, commits will be deployed automatically.\n  \n\n\n\n\u0026nbsp;\n## Testing\n\n### Strategies\n- unit test\n    - test individual units of code (e.g. single functions).\n    - tools: e.g. `JEST`\n- integration test\n    - test multiple components \u0026 services and how they work together.\n- e2e test\n    - test entire apps, like an end user would do.\n    - simulate human behavior (e.g. by clicking buttons automatically).\n    - tools: e.g. `CYPRESS`\n- performance test\n- functional test\n- etc.\n\n### Order\n1. Unit Tests (highest priority)\n2. API Tests (high priority)\n3. UI Tests (normal priority)\n4. Exploratory Tests (mimic user behavior to find bugs/errors)\n5. UX Tests (user experience)\n6. Beta Test (5% of user base)\n\n### Mocking\n➡️ Use sample data. Simulate (data) input.\n\n\n\n\u0026nbsp;\n\u0026nbsp;\n## Code Example with JEST\n### file\n- sum.js\n- sum.test.js\n\n### code in sum.js\n```js\nfunction sum( a, b ) {\n\treturn a + b\n}\n```\n\n### test in sum.test.js\n```js\n// \"test suite\" = collection of tests\ndescribe( 'My Feature', () =\u003e {\n\t\n\t// description of what is being tested\n\t// describing the behavior of the code\n\tit('finds the sum of a and b', () =\u003e {\n\n\t\t// run/execute code\n\t\tconst result = sum( 2, 2 );\n\t\n\t\t// test some fixed sample data\n\t\texpext( typeof result ).toBe( 'number' );\n\t\texpect( result ).toEqual( 4 );\n\t\texpect( result ).not.toBe( null );\t\n\t} );\n} );\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgunnar-miklis%2Flearn-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgunnar-miklis%2Flearn-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgunnar-miklis%2Flearn-testing/lists"}