Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6792331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:57:21+00:00 2026-05-26T17:57:21+00:00

I am new to unit testing, just getting into it using Check for C.

  • 0

I am new to unit testing, just getting into it using Check for C.

This is a question of unit testing theory. Let’s say (because it is true) that I have a module of code that formats messages to and from a serial protocol. I have another module which implements a state machine sending and receiving those messages.

I am starting to write unit tests for the message send and parse functions, and plan to write tests for the state machine too. In each case I use mocks/stubs to fake out the other module (apologies if I am misusing any unit testing buzzwords here).

Is it also considered a good idea to test the two modules together? So I would build the real state machine with the real protocol engine, drive it with wire-level messages and see if the appropriate state transitions and messages came out.

In theory this would already be covered by the individual tests, though..

Looking for some general clues, don’t have enough experience to have a feel for this yet.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:57:22+00:00Added an answer on May 26, 2026 at 5:57 pm

    If you’re testing the units together, it’s no longer unit testing. This is integration testing. Integration testing is helpful when it’s challenging to provide a mock for a particular unit.

    In your case, if the modules are cleanly separable, adding integration tests for these units may be redundant.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm just getting going with ASP.NET MVC and I'm also new to unit testing
I'm new to Unit Testing, and I'm only getting into the routine of building
I'm just getting stated with boost-test and unit testing in general with a new
I'm new to unit testing and NUit in particular. I'm just typing some examples
I'm new to RhinoMock's just been doing state unit testing up till now. How
I'm new to unit testing using nunit (and Java development in general). When creating
I am new to Unit Testing and think I might have dug myself into
I'm fairly new to the unit testing world, and I just decided to add
I'm leaning toward using MSTest as unit testing framework for a new project but
First let me just state that coding without unit testing is just plain crazy.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.