Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit Testing Framework #394

Open
diyarajon opened this issue Dec 30, 2023 · 0 comments · May be fixed by #405
Open

Unit Testing Framework #394

diyarajon opened this issue Dec 30, 2023 · 0 comments · May be fixed by #405
Assignees
Labels
enhancement New feature or request

Comments

@diyarajon
Copy link
Contributor

Describe the problem this feature will solve
When testing on Renode, the test file assumes that the supplementary files (dependencies) were written correctly. This suggests that bugs in the dependencies can impact the results of the singular file being tested, which is not desired. Additionally while Renode has been useful to run tests without hardware, it seems to have issues, including switching between tasks.

Describe the proposed solution
Unit testing will solve this problem by mocking the supplementary file's functions. This would mean that the dependencies' desired parameters and return values will be predetermined, making all of the supplementary functions predictable and as desired. This will allow us to test one file at a time without having to worry about other files impacting the test results.

Describe possible alternatives
Different unit testing frameworks have been considered including cmock and cmockery. However, Fake Function Framework (FFF) was ultimately selected as it makes for an easier integration and is lightweight.

Additional context
For more: Comprehensive Unit Testing

@diyarajon diyarajon added the enhancement New feature or request label Dec 30, 2023
@KnockbackNemo KnockbackNemo linked a pull request Jan 18, 2024 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants