Skip to content

Mocking an output port on UNIT TEST #1414

Answered by LeStarch
SMorettini asked this question in Q&A
Discussion options

You must be logged in to vote

Yes we do! https://nasa.github.io/fprime/UsersGuide/user/unit-testing.html

The unit test harness created by fprime-util impl --ut has stubbed port implementations for all ports on a component. Thus you can write whatever remote behavior you want and test the component in isolation.

In this example you'd create a test harness for Consumer and implement your mock state production in the test harness.

If you need more details to get started, please post back here!

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@SMorettini
Comment options

@codeflight1
Comment options

@kevin-f-ortega
Comment options

@timcanham
Comment options

Answer selected by SMorettini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants