Testing and philosophy

  • Admit software testing and design has no silver bullet.
  • Most important reasons to do TDD: Enjoyment, Refactoring, Confidence.
  • Test confidence can be increased by beginning with negative results.
  • BDD is valuable to the sanity of the team by declaring tests in this way we avoid the necessity to reverse engineer test expectations.
  • Pre-development acceptance tests are an unsolved technical problem which could help effective design.
  • BDD also provides a logical and human readable working specification.
  • The costs of testing are inversely proportional to deliberation and review.
  • SOLID design is benefited by including production code inside tests until it is more tangible where it should go.
  • BDD allows a developer to get on with his job over deciphering the thinking of other developers.
  • Inversion of Control pattern allows us to write shorter and more readable tests.
  • TDD is enabled by running one test at a time through a good hierarchical test runner saving time.
  • MSTest assert like this: Assert.IsTrue(value) nUnit assert like this : value.ShouldBe(true) Which is more readable?
  • Auto mocking is a feature of IoC frameworks, it enables the system under test’s dependancies to be auto discovered and added into the system.
  • Type Mock allows non-object oriented code to be tested.

Laws of Dependency Injection:

  1. Inversion of Control should not hold entities
  2. Any class with more than 3 dependencies should question SRP.
  3. Every dependency should be constructor injected.
  4. Should have only 1 constructor.
  5. IoC container should be referred to only in bootstrapper code.
  • Profiling should be done in very few moments during the early development of a product
  • The costs of testing are inversely proportional to deliberation and review.
  • MSpec is widely referred to as the best TDD framework.
  • TDD is impractical in java script although it is possible should the need arise.
  • TDD is not concerned with constants, they are declarative and rarely get broken.
  • Selenium is a mature web testing framework to be take seriously as an acceptance testing solution.
  • Selenesse is fitness driven web testing.

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s