Skip to content

Commit 6ddd5f1

Browse files
Merge pull request #110 from bitbybit-dev/develop
added page dedicated to live unit test coverage
2 parents ae822bd + 0bec53a commit 6ddd5f1

File tree

5 files changed

+160
-53
lines changed

5 files changed

+160
-53
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ Your contributions allow this project to exist.
2121
[Getting Started With Bitbybit Platform](https://learn.bitbybit.dev/learn/getting-started/overview)
2222
[Integrate With ThreeJS](https://learn.bitbybit.dev/learn/npm-packages/threejs)
2323
[Integrate With BabylonJS](https://learn.bitbybit.dev/learn/npm-packages/babylonjs)
24-
[Bitbybit Runners](https://learn.bitbybit.dev/learn/runners)
24+
[Bitbybit Runners](https://learn.bitbybit.dev/learn/runners)
2525
[Bitbybit Blog](https://learn.bitbybit.dev/blog)
26-
[3D Bits App For Shopify](https://learn.bitbybit.dev/learn/3d-bits/intro)
26+
[3D Bits App For Shopify](https://learn.bitbybit.dev/learn/3d-bits/intro)
27+
[Unit Testing Approach](https://learn.bitbybit.dev/learn/github/unit-tests)
28+
[Live Unit Test Coverage](https://learn.bitbybit.dev/learn/github/live-unit-test-coverage)
2729

2830
## Github
2931
https://github.com/bitbybit-dev/bitbybit

UNIT_TESTING_GUIDE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
This guide covers unit testing best practices and conventions for the Bitbybit monorepo.
44

5+
## Additional Resources
6+
7+
For more information about our unit testing philosophy and live coverage reports, visit:
8+
- [Unit Testing Approach](https://learn.bitbybit.dev/learn/github/unit-tests) - Learn about our pragmatic approach to testing 3D algorithms
9+
- [Live Coverage Reports](https://learn.bitbybit.dev/learn/github/live-unit-test-coverage) - Explore real-time test coverage for all core packages
10+
511
## Tech Stack
612

713
- **Language:** TypeScript
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
---
2+
sidebar_position: 3
3+
title: Live Unit Test Coverage Reports
4+
sidebar_label: Live Coverage Reports
5+
description: Explore live unit test coverage reports for Bitbybit's core packages, demonstrating our commitment to quality and transparency.
6+
tags: [github, unit-tests, coverage, development]
7+
---
8+
9+
# Live Unit Test Coverage Reports
10+
11+
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.
12+
13+
## Why Share Test Coverage Reports?
14+
15+
Making our test coverage reports public serves several important purposes:
16+
17+
### 1. **Transparency & Trust**
18+
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.
19+
20+
### 2. **Quality Assurance Visibility**
21+
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.
22+
23+
### 3. **Inviting Community Contributions**
24+
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.
25+
26+
### 4. **Accountability**
27+
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.
28+
29+
### 5. **Educational Resource**
30+
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.
31+
32+
## Understanding the Reports
33+
34+
The reports below show:
35+
- **Test suites and individual tests** with pass/fail status
36+
- **Code coverage metrics** including line, branch, function, and statement coverage
37+
- **Detailed execution results** for each test case
38+
39+
---
40+
41+
## Core Package Coverage Reports
42+
43+
### 1. Base Utilities and Core Types (`@bitbybit-dev/base`)
44+
45+
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.
46+
47+
<iframe
48+
src="https://tests.bitbybit.dev/base"
49+
width="100%"
50+
style={{backgroundColor: "white"}}
51+
height="600px"
52+
frameBorder="0"
53+
scrolling="yes"
54+
title="Bitbybit - Base Utilities Unit Test Report"
55+
allow="fullscreen"
56+
></iframe>
57+
58+
---
59+
60+
### 2. OpenCascade Technology (OCCT) Wrapper (`@bitbybit-dev/occt`)
61+
62+
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.
63+
64+
<iframe
65+
src="https://tests.bitbybit.dev/occt"
66+
style={{backgroundColor: "white"}}
67+
width="100%"
68+
height="600px"
69+
frameBorder="0"
70+
scrolling="yes"
71+
title="Bitbybit - OCCT Wrapper Unit Test Report"
72+
allow="fullscreen"
73+
></iframe>
74+
75+
---
76+
77+
### 3. Three.js Integration (`@bitbybit-dev/threejs`)
78+
79+
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.
80+
81+
<iframe
82+
src="https://tests.bitbybit.dev/threejs"
83+
style={{backgroundColor: "white"}}
84+
width="100%"
85+
height="600px"
86+
frameBorder="0"
87+
scrolling="yes"
88+
title="Bitbybit - ThreeJS Integration Unit Test Report"
89+
allow="fullscreen"
90+
></iframe>
91+
92+
---
93+
94+
### 4. PlayCanvas Integration (`@bitbybit-dev/playcanvas`)
95+
96+
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.
97+
98+
<iframe
99+
src="https://tests.bitbybit.dev/playcanvas"
100+
style={{backgroundColor: "white"}}
101+
width="100%"
102+
height="600px"
103+
frameBorder="0"
104+
scrolling="yes"
105+
title="Bitbybit - PlayCanvas Integration Unit Test Report"
106+
allow="fullscreen"
107+
></iframe>
108+
109+
---
110+
111+
## Additional Package Reports Coming Soon
112+
113+
We are continuously expanding our test coverage across the Bitbybit ecosystem. Reports for additional packages, including:
114+
- **BabylonJS Integration** (`@bitbybit-dev/babylonjs`)
115+
- **JSCAD Wrapper** (`@bitbybit-dev/jscad`)
116+
- **Manifold Wrapper** (`@bitbybit-dev/manifold`)
117+
118+
...will be added as they become available.
119+
120+
---
121+
122+
## Contributing to Test Coverage
123+
124+
If you'd like to help improve our test coverage:
125+
126+
1. **Explore the reports** to identify untested code paths
127+
2. **Fork our repository** on GitHub
128+
3. **Write unit tests** for uncovered functionality
129+
4. **Submit a pull request** with your tests
130+
131+
We welcome contributions that help make Bitbybit more robust and reliable!
132+
133+
For more information about our testing philosophy and approach, see our [Unit Testing Approach](/learn/github/unit-tests) page.

docs/learn/github/unit-tests.md

Lines changed: 11 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -47,59 +47,20 @@ This "bottom-up" prioritization helps us maximize the impact of our testing effo
4747

4848
### Our Commitment to Transparency and Collaboration
4949

50-
We choose to share our unit test reports publicly for several key reasons, even though we do not achieve 100% code coverage across modules.
50+
We choose to share our unit test reports publicly for several key reasons, even though we do not achieve 100% code coverage across modules:
5151
* **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.
5252
* **Proof of Testing:** It demonstrates that unit tests are an integral part of our development process and that we are committed to quality.
5353
* **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.
5454

55-
## Live Unit Test Reports
56-
57-
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.
58-
59-
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.
60-
61-
### 1. Base Utilities and Core Types (`@bitbybit-dev/base`)
62-
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.
63-
64-
<iframe
65-
src="https://tests.bitbybit.dev/base"
66-
width="100%"
67-
style={{backgroundColor: "white"}}
68-
height="600px"
69-
frameborder="0"
70-
scrolling="yes"
71-
title="Bitbybit - Base Utilities Unit Test Report"
72-
allow="fullscreen"
73-
></iframe>
74-
75-
### 2. OpenCascade Technology (OCCT) Wrapper (`@bitbybit-dev/occt`)
76-
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.
77-
78-
<iframe
79-
src="https://tests.bitbybit.dev/occt"
80-
style={{backgroundColor: "white"}}
81-
width="100%"
82-
height="600px"
83-
frameborder="0"
84-
scrolling="yes"
85-
title="Bitbybit - OCCT Wrapper Unit Test Report"
86-
allow="fullscreen"
87-
></iframe>
88-
89-
### 3. ThreeJS Integration (`@bitbybit-dev/threejs`)
90-
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.
91-
92-
<iframe
93-
src="https://tests.bitbybit.dev/threejs"
94-
style={{backgroundColor: "white"}}
95-
width="100%"
96-
height="600px"
97-
frameborder="0"
98-
scrolling="yes"
99-
title="Bitbybit - ThreeJS Integration Unit Test Report"
100-
allow="fullscreen"
101-
></iframe>
55+
## Live Unit Test Coverage Reports
10256

103-
---
57+
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.
58+
59+
**[View Live Coverage Reports →](/learn/github/live-unit-test-coverage)**
60+
61+
The coverage reports include:
62+
- Test execution results for core packages (Base, OCCT, Three.js, PlayCanvas, and more)
63+
- Detailed coverage metrics (line, branch, function, and statement coverage)
64+
- Clear visibility into tested and untested code paths
10465

105-
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.
66+
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.

docs/learn/tags.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,4 +811,9 @@ cdn:
811811
hosting:
812812
label: Hosting
813813
permalink: /hosting
814-
description: Web hosting and server management.
814+
description: Web hosting and server management.
815+
816+
coverage:
817+
label: Coverage
818+
permalink: /coverage
819+
description: Unit test coverage

0 commit comments

Comments
 (0)