Functional Design and Architecture by Alexander Granin #BookSummary

Functional Design and Architecture by Alexander Granin #BookSummary

Testing

  • Testing is not a guarantee of being free from bugs, and it’s not the point of testing. The point of testing is in reducing risks by verifying that main and important requirements are met.
  • The more meaningful tests you have, the lower the risks are, but the higher the maintenance cost.
  • Different testing covers different sets of requirements and thus risks.
  • White-box tests verify the functional requirements (what the code should and should not do).
  • Black-box testing may be used for verifying the functional requirements or validating the non-functional requirements.
  • Property-based is more suitable for CPU-bound and pure code, but less suitable for IO-bound code.
  • Regression tests protect from unexpected breakages. And sometimes we write tests to find bugs.
  • If we’re shipping an application framework, a good idea will be to provide a testing framework so that our clients could test their scenarios.
  • Establishing a proper testing environment may be expensive or even impossible if the architecture isn’t testable.
  • Three-layered Free monadic architecture has a very good testability compared to all other architectural approaches.
  • Mocking is important. Achieving good (meaning useful) test coverage without mocks doesn’t seem possible for most of the applications which are IO-bound by nature.
  • Mocking is only possible with good architecture that follows all the design principles such as SOLID or ‘low coupling, high cohesion’.
  • Free monadic architectures achieve very good testability by decoupling interfaces and implementation.
  • Automatic white-box testing is good for golden tests although it’s a bit clumsy in setup and maintenance.

#Booksummary

#WeekReading

Credit : Manning


要查看或添加评论,请登录

Pankaj Gajjar的更多文章

社区洞察

其他会员也浏览了