The Artima Developer Community
Sponsored Link

Java Buzz Forum
Number of asserts per test

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jon Tirsen

Posts: 33
Nickname: tirsen
Registered: Apr, 2003

Jon Tirsen is a developer at Lecando AB working a lot with open source and agile methodologies
Number of asserts per test Posted: Aug 1, 2003 5:31 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Jon Tirsen.
Original Post: Number of asserts per test
Feed Title: jutopia
Feed URL: http://sedoparking.com/search/registrar.php?domain=®istrar=sedopark
Feed Description: Ramblings on Java, AOP, TDD, agile and so on. some like it jutopic!
Latest Java Buzz Posts
Latest Java Buzz Posts by Jon Tirsen
Latest Posts From jutopia

Advertisement
Interesting metric: mean number of asserts per test. What does it say about the design, requirements and quality of tests for a system, a module and a single unit?

The number of asserts in a test generally define the complexity of a test. An extremely large number of asserts is probably a smell indicating your tests are too functional or not proper unit-tests. A moderately large number of asserts doesn't necessarily indicate this though, it would rather indicate the complexity of the responsibilities the unit under test needs to perform. A very small number of asserts would rather indicate that your tests does not test a proper feature of the unit (incomplete test) or that the features are very simple (indicating things like value objects or data-only objects, objects with no proper responsibilities).

I wonder if there's a recommended mean for a system with good test. Like 5 or 10, or no more than 15 but no less than 3.

Read: Number of asserts per test

Topic: Use The Source, Duke! Previous Topic   Next Topic Topic: JPower 1.0 is out

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use