Skip to content

Unit test v Integration test #426

@Hritik14

Description

@Hritik14

Unit tests make sure that functionality of a unit of code doesn't break. It works good for testing functions like to_advisories and comparing it with expected advisories but sometimes the upstream source changes and those are undetectable by unit tests (#423). An integration test that checks the updated_advisories provided with a very small real data source should fix this problem.
Here is how it could be implemented:

  • Mock the real data source to return only a small amount of data. It is the responsibility of the test to supply small yet valid data that is actually fetched from the upstream. Valid
  • Run the importer against that data source.

This could entirely be avoided by solving #210 and having the entire suit run as one perfect integration test but until that is fixed we can have some small integration tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions