Testability Framework

As we have seen in Chapter 6, testing plays an important role in the DevOps cycle of microservices development. Whereas code-centric tests like unit tests are still up to the developer, Service Fabric supports testing applications and services for faults in a number of ways.

The simplest and easiest way to test our service in case of node failures is using the Service Fabric Explorer. It provides an easy way to shut down, stop and restart nodes. Those types of tests enable us to see how a service behaves under those circumstances and thus provide valuables insights. When testing stateful services, we can usually observe how Service Fabric promotes a secondary to become the primary while the service is still available and keeps its state. Figure 8.10 shows the action menu that enables us to shut down and restart the node.

Image

FIGURE 8.10: Service Fabric Explorer node action menu

Besides this simple test, Service Fabric also comes with a more advanced testability framework that enables us to conduct Chaos tests and Failover tests. We could write an entire chapter covering the Service Fabric testability framework but that is beyond the scope of this book. For us it is important to know that such a testability framework exists and that tests can be executed in an automated manner through C# and PowerShell.

More information about Service Fabric testability framework can be found here: https://azure.microsoft.com/en-us/documentation/articles/service-fabric-testability-overview/.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.206.254