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


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

You must login to add post.


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.

Open your app
Sign InSign Up

Crextio.com

Crextio.com Logo Crextio.com Logo

Crextio.com Navigation

  • User Profile
  • Edit Profile
  • Pending Questions
  • Pending Posts
  • Messages
  • Asked Questions
  • Best Answers
  • Points
  • Activities
  • Post An Article
  • Create A Group
  • Log Out
Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Home
  • Blog Post
  • New Group
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • All Groups
  • Tags
  • Badges
  • Users
  • Help
  • User Profile
  • Edit Profile
  • Pending Questions
  • Pending Posts
  • Messages
  • Asked Questions
  • Best Answers
  • Points
  • Activities
  • Post An Article
  • Create A Group
  • Log Out
Home/ Questions/Q 36874
Next
In Process

Crextio.com Latest Questions

Paul Fink
  • 0
  • 0
Paul FinkNew You
Asked: January 5, 20222022-01-05T21:24:16+01:00 2022-01-05T21:24:16+01:00In: Education

Unit Testing

  • 0
  • 0

how do I get better at unit testing? Tips form y’all?

2
  • 2 2 Answers
  • 127 Views
  • 0 Followers
  • 0
Share
  • Facebook

    Related Questions

    • The Future of Education: How Online Learning is Changing the Classroom
    • How to Master the Art of Saying "No" Without Feeling Guilty
    • Microlearning: The Secret to Retaining More in Less Time
    Leave an answer

    Leave an answer
    Cancel reply

    Browse
    Browse

    2 Answers

    • Voted
    • Oldest
    • Recent
    1. Tabitha Sosa
      Tabitha Sosa New You
      2022-01-10T09:11:47+01:00Added an answer on January 10, 2022 at 9:11 am

      Being able to properly unit test your code also requires that you can break it down into sensible modules that can be either mocked or tested, each in total isolation from one another.
      Your code should be designed in a way that allows you to feed it data and not care where the input/output comes from/goes to. So the actual reading and writing to the file is abstracted away and your core code should be outputting some sort of sensible data structure, that then gets translated to the file format you need. You should be able to test your core logic and file reading/writing completely separately.

        • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    2. Helga Horton
      Helga Horton New You
      2022-01-10T09:54:47+01:00Added an answer on January 10, 2022 at 9:54 am

      Unit test should be small, and independent. If you need to bring up real dependencies instead of mocks, then your unit test became fragile because that real dependencies can bring changes unrelated to your expectations.

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

    Sidebar

    • The Evolution of Decentralized Finance (DeFi)
    • The Evolution of Decentralized Finance (DeFi)
    • Cortez Clothing Elevate Your Streetwear Game with Style
    • Cortez Clothing Elevate Your Streetwear Game with Style
    • Cortez Clothing Elevate Your Streetwear Game with Style

    Explore

    • Home
    • Blog Post
    • New Group
    • Communities
    • Questions
      • New Questions
      • Trending Questions
      • Must read Questions
      • Hot Questions
    • Polls
    • All Groups
    • Tags
    • Badges
    • Users
    • Help

    Footer

    Crextio.com

    Crextio

    We go wherever the idea takes us

    About Us

    • Blog
    • About Us
    • Contact Us
    • All Groups

    Legal Information

    • FAQs
    • Terms and conditions
    • Cookie Policy
    • Privacy policy.

    Crextio Help Desk

    • Knowledge Base
    • Support
    • Disclaimer

    Follow

    © 2025 Crextio. All Rights Reserved