diff --git a/README.md b/README.md index df9b957a..61d20d47 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,11 @@ Your contributions allow this project to exist. [Getting Started With Bitbybit Platform](https://learn.bitbybit.dev/learn/getting-started/overview) [Integrate With ThreeJS](https://learn.bitbybit.dev/learn/npm-packages/threejs) [Integrate With BabylonJS](https://learn.bitbybit.dev/learn/npm-packages/babylonjs) -[Bitbybit Runners](https://learn.bitbybit.dev/learn/runners) +[Bitbybit Runners](https://learn.bitbybit.dev/learn/runners) [Bitbybit Blog](https://learn.bitbybit.dev/blog) -[3D Bits App For Shopify](https://learn.bitbybit.dev/learn/3d-bits/intro) +[3D Bits App For Shopify](https://learn.bitbybit.dev/learn/3d-bits/intro) +[Unit Testing Approach](https://learn.bitbybit.dev/learn/github/unit-tests) +[Live Unit Test Coverage](https://learn.bitbybit.dev/learn/github/live-unit-test-coverage) ## Github https://github.com/bitbybit-dev/bitbybit diff --git a/UNIT_TESTING_GUIDE.md b/UNIT_TESTING_GUIDE.md index 850812e7..811179a0 100644 --- a/UNIT_TESTING_GUIDE.md +++ b/UNIT_TESTING_GUIDE.md @@ -2,6 +2,12 @@ This guide covers unit testing best practices and conventions for the Bitbybit monorepo. +## Additional Resources + +For more information about our unit testing philosophy and live coverage reports, visit: +- [Unit Testing Approach](https://learn.bitbybit.dev/learn/github/unit-tests) - Learn about our pragmatic approach to testing 3D algorithms +- [Live Coverage Reports](https://learn.bitbybit.dev/learn/github/live-unit-test-coverage) - Explore real-time test coverage for all core packages + ## Tech Stack - **Language:** TypeScript diff --git a/docs/learn/github/live-unit-test-coverage.md b/docs/learn/github/live-unit-test-coverage.md new file mode 100644 index 00000000..19058f97 --- /dev/null +++ b/docs/learn/github/live-unit-test-coverage.md @@ -0,0 +1,133 @@ +--- +sidebar_position: 3 +title: Live Unit Test Coverage Reports +sidebar_label: Live Coverage Reports +description: Explore live unit test coverage reports for Bitbybit's core packages, demonstrating our commitment to quality and transparency. +tags: [github, unit-tests, coverage, development] +--- + +# Live Unit Test Coverage Reports + +We believe in **transparency and accountability** in our development process. To that end, we make our unit test coverage reports publicly available for core packages in the Bitbybit ecosystem. + +## Why Share Test Coverage Reports? + +Making our test coverage reports public serves several important purposes: + +### 1. **Transparency & Trust** +By openly sharing our test coverage, we demonstrate our commitment to quality and allow users to see exactly which parts of the codebase are tested. This builds trust with developers who rely on Bitbybit for their projects. + +### 2. **Quality Assurance Visibility** +Coverage reports provide concrete evidence of our testing efforts. While coverage percentage alone doesn't guarantee quality, it shows that we systematically test our code and continuously monitor which areas need more attention. + +### 3. **Inviting Community Contributions** +Public coverage reports help potential contributors identify areas that could benefit from additional tests. If you see untested code paths that you believe should have coverage, we welcome pull requests with additional unit tests. + +### 4. **Accountability** +Making these reports live and accessible holds us accountable to maintain and improve our testing standards over time. It's a public commitment to quality that we take seriously. + +### 5. **Educational Resource** +For developers learning about testing practices in complex 3D and CAD applications, these reports serve as real-world examples of how testing can be structured and maintained. + +## Understanding the Reports + +The reports below show: +- **Test suites and individual tests** with pass/fail status +- **Code coverage metrics** including line, branch, function, and statement coverage +- **Detailed execution results** for each test case + +--- + +## Core Package Coverage Reports + +### 1. Base Utilities and Core Types (`@bitbybit-dev/base`) + +This package contains fundamental utilities, type definitions, and helper functions used across the Bitbybit platform. Its tests ensure the stability of these core building blocks. + + + +--- + +### 2. OpenCascade Technology (OCCT) Wrapper (`@bitbybit-dev/occt`) + +This is a critical package providing the JavaScript/TypeScript interface to the powerful OpenCascade geometric modeling kernel. Tests here cover a wide range of CAD operations, from creating basic shapes to complex boolean operations, filleting, chamfering, and data import/export. + + + +--- + +### 3. Three.js Integration (`@bitbybit-dev/threejs`) + +This package facilitates the integration of Bitbybit's algorithmic capabilities with the Three.js 3D graphics library. Tests cover drawing Bitbybit geometries in Three.js, converting between Bitbybit and Three.js data structures, and utility functions specific to the Three.js environment. + + + +--- + +### 4. PlayCanvas Integration (`@bitbybit-dev/playcanvas`) + +This package provides the integration layer between Bitbybit and the PlayCanvas game engine. Tests verify the correct rendering of CAD geometries as PlayCanvas entities, material application, camera controls, and other PlayCanvas-specific functionality. + + + +--- + +## Additional Package Reports Coming Soon + +We are continuously expanding our test coverage across the Bitbybit ecosystem. Reports for additional packages, including: +- **BabylonJS Integration** (`@bitbybit-dev/babylonjs`) +- **JSCAD Wrapper** (`@bitbybit-dev/jscad`) +- **Manifold Wrapper** (`@bitbybit-dev/manifold`) + +...will be added as they become available. + +--- + +## Contributing to Test Coverage + +If you'd like to help improve our test coverage: + +1. **Explore the reports** to identify untested code paths +2. **Fork our repository** on GitHub +3. **Write unit tests** for uncovered functionality +4. **Submit a pull request** with your tests + +We welcome contributions that help make Bitbybit more robust and reliable! + +For more information about our testing philosophy and approach, see our [Unit Testing Approach](/learn/github/unit-tests) page. diff --git a/docs/learn/github/unit-tests.md b/docs/learn/github/unit-tests.md index cd4352e8..b620c1eb 100644 --- a/docs/learn/github/unit-tests.md +++ b/docs/learn/github/unit-tests.md @@ -47,59 +47,20 @@ This "bottom-up" prioritization helps us maximize the impact of our testing effo ### Our Commitment to Transparency and Collaboration -We choose to share our unit test reports publicly for several key reasons, even though we do not achieve 100% code coverage across modules. +We choose to share our unit test reports publicly for several key reasons, even though we do not achieve 100% code coverage across modules: * **Building Trust:** Transparency in our testing efforts helps build trust with our users and the developer community. You can see for yourselves the areas we are actively testing and the current health of our codebase. * **Proof of Testing:** It demonstrates that unit tests are an integral part of our development process and that we are committed to quality. * **Inviting Collaboration:** By making these reports public, we invite potential collaborators to identify areas that may need more test coverage. This openness encourages contributions from the community, whether it's by reporting issues found through untested paths or by submitting pull requests with new unit tests for parts of the platform that are not yet comprehensively covered. We believe that collaborative testing strengthens the platform for everyone. -## Live Unit Test Reports - -We believe in transparency and continuous improvement. To that end, we are making our unit test execution reports publicly available. These reports provide a live view of our testing status for various core packages. - -Below are links to the live test reports for some of our key packages. More reports for other parts of the Bitbybit ecosystem will be shared as they become available. - -### 1. Base Utilities and Core Types (`@bitbybit-dev/base`) -This package contains fundamental utilities, type definitions, and helper functions used across the Bitbybit platform. Its tests ensure the stability of these core building blocks. - - - -### 2. OpenCascade Technology (OCCT) Wrapper (`@bitbybit-dev/occt`) -This is a critical package providing the JavaScript/TypeScript interface to the powerful OpenCascade geometric modeling kernel. Tests here cover a wide range of CAD operations, from creating basic shapes to complex boolean operations, filleting, chamfering, and data import/export. - - - -### 3. ThreeJS Integration (`@bitbybit-dev/threejs`) -This package facilitates the integration of Bitbybit's algorithmic capabilities with the ThreeJS 3D graphics library. Tests cover drawing Bitbybit geometries in ThreeJS, converting between Bitbybit and ThreeJS data structures, and utility functions specific to the ThreeJS environment. - - +## Live Unit Test Coverage Reports ---- +We make our unit test coverage reports publicly available for core packages. These live reports, together with open-sourced test files provide complete transparency into our testing efforts, showing detailed test results, coverage metrics, and execution status. + +**[View Live Coverage Reports →](/learn/github/live-unit-test-coverage)** + +The coverage reports include: +- Test execution results for core packages (Base, OCCT, Three.js, PlayCanvas, and more) +- Detailed coverage metrics (line, branch, function, and statement coverage) +- Clear visibility into tested and untested code paths -By regularly running and monitoring these tests, we strive to maintain quality and stability of the platform. We encourage you to explore these reports to get a deeper insight into our development practices and the stability of our core components. \ No newline at end of file +By regularly running and monitoring these tests, we strive to maintain the quality and stability of the platform. We encourage you to explore these reports to get a deeper insight into our development practices and the reliability of our core components. \ No newline at end of file diff --git a/docs/learn/tags.yml b/docs/learn/tags.yml index e402b4e1..f8277d3b 100644 --- a/docs/learn/tags.yml +++ b/docs/learn/tags.yml @@ -811,4 +811,9 @@ cdn: hosting: label: Hosting permalink: /hosting - description: Web hosting and server management. \ No newline at end of file + description: Web hosting and server management. + +coverage: + label: Coverage + permalink: /coverage + description: Unit test coverage