About Tests

Sumit Rawal answered on May 23, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • what is test management review
  • what is soak testing
  • how to write a test plan
  • what is testing
  • why do we write unit tests in programming
  • test coverage techniques
  • which test can be automated
  • //testing
  • testing techniques
  • What is a test automation framework? #
  • Unit tests#
  • when to test analysis
  • test sample
  • create test
  • Unit Tests
  • Tests in unittest
  • Common types of test automation #
  • Do we need tests?#
  • Types of tests#
  • Unit Tests
  • More tests#
  • It makes sure your tests are testing the right things.
  • Implementing a Unit Test
  • how to achieve best test coverage

  • About Tests

    0

    Do we need tests?

    Types of tests

    Do we need tests?

    In the domain of strong static typing (not necessarily functional), we might hear phrases like “It compiles, therefore, it must be correct , and thus we don’t need tests!”

    While it is true that certain kinds of tests can be omitted in favor of strong static typing, such a stance overlooks that even a correctly-typed program may produce the wrong output.

    svg viewer

    The other extreme (coming from dynamically-typed land) is to substitute typing with testing, which is even worse. Remember that testing is usually a probabilistic approach and cannot guarantee the absence of bugs. If you have ever refactored a large codebase in both paradigms, you will very likely come to esteem a good type system.

    Types of tests

    Let us think a bit about the kinds of tests we need.

    Our service must read and create data in the JSON format. This format should be fixed and changes to it should raise red flags because any changes would mean that our API just broke.

    We want to unleash the power of ScalaCheck to benefit from property-based testing. But even when we’re not using that, we can still use ScalaCheck to generate test data for us.

    In addition to the regular unit tests, there should be integration tests if a service is written. We can test a lot of things on the unit test side, but in the end, the integration of all our moving parts is what matters, and often (usually on the not-so-pure side of things) we would have to mock a lot to test things in isolation. 

    Popularity 1/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Tags: whatever
    Link to this answer
    Share Copy Link
    Contributed on May 23 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.