{"id":22166100,"url":"https://github.com/alextanhongpin/testing-learn","last_synced_at":"2026-02-06T14:16:31.655Z","repository":{"id":79115282,"uuid":"207146388","full_name":"alextanhongpin/testing-learn","owner":"alextanhongpin","description":"How to excel at testing","archived":false,"fork":false,"pushed_at":"2021-09-04T10:57:25.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T16:15:10.720Z","etag":null,"topics":["testing"],"latest_commit_sha":null,"homepage":null,"language":null,"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/alextanhongpin.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":"2019-09-08T17:13:35.000Z","updated_at":"2021-09-04T10:57:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"749b3526-20e3-4e37-a971-8259220a5f77","html_url":"https://github.com/alextanhongpin/testing-learn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alextanhongpin/testing-learn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alextanhongpin%2Ftesting-learn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alextanhongpin%2Ftesting-learn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alextanhongpin%2Ftesting-learn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alextanhongpin%2Ftesting-learn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alextanhongpin","download_url":"https://codeload.github.com/alextanhongpin/testing-learn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alextanhongpin%2Ftesting-learn/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265205775,"owners_count":23727511,"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","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":["testing"],"created_at":"2024-12-02T05:18:03.851Z","updated_at":"2026-02-06T14:16:26.609Z","avatar_url":"https://github.com/alextanhongpin.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# testing-learn\nHow to excel at testing\n\n- the basics\n- what makes a good test\n- is your code testable? structure matters\n- testing clean architecture\n- testing dependency or infra\n- testing complex pipeline\n- unit testing technique\n- how to unit test microservice\n- testing in containerized application\n- how to cover all combinations of scenarios?\n- how does testing relate to user story/requirements/use cases?\n- writing user stories\n- writing bdd - come up with a list of examples\n- specification by examples\n- writing use cases\n- writing readme\n\n\n# Scenarios\n\nTake for example for user registration, we have the following variables:\n\n- user state: registered/not registered\n- email state: valid email/not valid email\n- password state: valid password/not valid password\n\nWhich leaves us with the following combinations:\n```\n2x2x2 = 8 combinations\n```\n\nBut since if the user is already registered, there are no possible combinations after that, that leaves us with only five test cases that needs to be covered, namely:\n\n```\ngiven that the user is already registered,\n  when I register with email john.doe@mail.com and password 12345678\n  then the account should not be created\n  and I should receive an error\n\ngiven that the user is not registered,\n  // Single test vs multiple input test below.\n  // when I register with email john.doe@mail.com and password 12345678\n  // then an account should be created\n\n  when I register with invalid email (list of invalid emails) and invalid password (list of valid passwords)\n  then an account should not be created\n  and I should receive an error\n\n  when I register with valid email (list of valid emails) and invalid password (list of invalid passwords)\n  then an account should not be created\n  and I should receive an error\n\n  when I register with invalid email (list of invalid emails) and valid password (list of valid passwords)\n  then an account should not be created\n  and I should receive an error\n  \n  when I register with valid email (list of valid emails) and valid password (list of valid passwords)\n  then an account should be created\n```\n\nTest the scenario that will cause failure first - that is the priority. Test the success scenario last. For password, there are actually two scenarios, which is valid (length validation, format etc) and correctness (it matches the user password).\nAlso, we want to ensure that the user's password is not stored as plain text in the db, so it should be an additional test too.\n\n## Fuzz Testing (Fuzzing)\n\nhttps://en.wikipedia.org/wiki/American_fuzzy_lop_(fuzzer)\n\n## QuickCheck\n\nProperty testing.\n\n\n## String\n\nPrepare fixtures for text:\n\n- Long/short\n- No whitespace long\n- Empty\n- Just white space\n- Start white space\n- End white space\n- Chinese\n- Korean\n- Accented\n- Foreign\n- Emoji\n- Scripts\n- SQL injection\n- Links \n- Promo code\n- Email\n- Phone number\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falextanhongpin%2Ftesting-learn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falextanhongpin%2Ftesting-learn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falextanhongpin%2Ftesting-learn/lists"}