1

If I have a class/object/component, and I test its API directly, in complete isolation, mocking/stubbing any complex parameters on which it depends, it's called a Unit Test.

If I have a whole application made up of classes/objects/components, a user interface, and all sorts, and I test its behaviour through a certain journey (with no parts being mocked/stubbed) it's called an End-to-end test.

If I implement a new feature, and I write a test which interacts with the highest level of the application which has an effect on that feature (and thus include multiple classes/objects/components, but not necessarily all of them, and may need to mock/stub some components)... what name would you give to this type of test? (I realise I am taking part in BDD/TDD, but what is the name of the type of test I have written?).

Behaviour test? Spec test? Integration test? Something else?

1

It depends.

Under most circumstances this would be considered an integration test, but what it actually gets called will depend on your environment. I've known environments that would consider the type of test you describe a functional test, others, if you were dealing primarily with an API regardless of what the back end of the API did would call it an API test

In my opinion the most important aspect of what you call the test is that everyone you communicate with knows what you mean when you name that type of test.

1

It could be called a Feature test or a "functionary test" as well.

  • Feature: a distinctive attribute or aspect of something.
  • Functionality: the quality of being suited to serve a purpose well; practicality.

And as Kate pointed out, what do you name it is far less important than how everyone should agree to name it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.