1- What is test coverage, and why is it important?
2- Should you do 100% test coverage? What should you consider while determining the right level of test coverage?
3- How does static analysis testing differ from unit testing?
4- What are some common tools used for static analysis testing in JavaScript?
5- How can developers enforce static analysis rules across their team projects?
6- What is CI/CD and why are automated testing and CI/CD important?
7- How can Husky and GitHub Actions help enforce CI/CD practices?
Elaf Gardi, Rawan Mustafa, Ninos Dinkha, Ibrahim muhaned, Hana Abdulla and Maram qais
1- Test coverage is the percentage of a software application's code tested by its test suite. It is important since it ensures that the tests are thorough and capable of detecting potential defects or vulnerabilities in the codebase.
2- Trying to get 100% test coverage isn't always required or possible. The appropriate level of coverage depends on project requirements, risks, and resources. Determine the appropriate level of coverage by taking into account important features, probable failure sites, and test prioritization.
3- Static analysis testing analyzes code without running it, looking for possible bugs like as coding standards violations, security vulnerabilities, or code complexity. Unit testing, on the other hand, involves running single code units to ensure their behavior and operation, usually focused on individual functions or methods.
4- Tools used for static analysis testing in JavaScript include ESLint, JSHint, and JSLint.
5- Developers can enforce static analysis rules across their team projects by integrating static analysis tools into their continuous integration pipelines, configuring shared rule sets, and conducting regular code reviews to ensure compliance
6- CI/CD is Continuous Integration/Continuous Delivery. Automated testing and CI/CD are crucial for improving code quality, speeding up development, and ensuring reliable software delivery.
7- Husky enforces pre-commit and pre-push hooks for local testing, while GitHub Actions automates testing and deployment workflows, ensuring continuous integration and delivery practices are followed.