TagService Fabric

Integration Tests in Service Fabric – Client side deployment

I

In the most recent post, I showed how the R base class fetches all the test definitions from the cluster and executes the tests one by one. In this post, I will walk you through the client side deployment. One of the nice benefits of Service Fabric is that it provides out of the box a relatively complete deployment story. It is possible to deploy application packages entirely in code by using Powershell or C#. All you need for that to work is the latest SDK. To deploy an application to the...

Integration Tests in Service Fabric – Client side test cases

I

In the last post, I showed how it is possible to write test fixture that gets access to the reliable state manager and more that is only available when running on the cluster. In this post, I’ll explain the client side that interacts over remote proxies with the tests that are running on the cluster. In the post about the test definition I showed that in order to interact with the tests defined in the OrderShippingTests stateful service that is deployed with the...

Integration Tests in Service Fabric – Write tests accessing infrastructure

I

Previously I explained how the test definition works. In this post I’ll show how we declare tests and get access to the infrastructure provided by the stateful service. Components that are used inside a stateful service most likely end-up using either the StatefulServiceContext, the IStatefulServicePartition, the IReliableStateManager or other methods and properties provided by the stateful service inheritance hierarchy. Let’s have an oversimplified look at how the hierarchy looks...

Integration Tests in Service Fabric – Test definition

I

In the last post I gave an overview of the conventions that drive the solution structure and define the test applications. All the code I’m going to explore in this, and future blog posts can be found on my ServiceFabric.Testing repository. The code in the repository doesn’t use the OrderShipping analogy used in the post, but I’ll hope you still get the point ;). The OrderShippingTests project stateful service has to inherit from the stateful service called AbstractTestRunner...

Integration Tests in Service Fabric – The structure

I

In my last post, I gave a quick overview how running tests inside Service Fabric looks like both from Visual Studio and Jetbrains Rider. To be able to dive deeper into the infrastructure, I want to present the high-level component pieces first. Every project has its own conventions how tests are componentized and structured around the production code. Many teams I’ve seen usually have a dedicated assembly per production assembly which contains a certain category of tests. For example, if...

Better way of running integration tests inside Service Fabric

B

In the last post, I showed how you could run integration tests inside Service Fabric.┬áThe approach I showed has one mature problem: It is not possible to reliably run these tests from within your favourite IDE of choices like Visual Studio or Jetbrains Rider. Today I’ll show you a more sophisticated approach to run tests inside Service Fabric including support to run the tests from within any IDE that allows running NUnit tests. Here is a short video how it looks like. The video is...

Running integration tests inside Service Fabric

R

I’m currently diving into Service Fabric. One of the difficult things that you’ll be faced with when you write code against the Service Fabric APIs is how you can integration test those components. Infrastructure like the reliable state manager is only available inside Service Fabric. So somehow you need to run the tests that are testing the components that use infrastructure like reliable state manager inside the cluster. In this post, I show you an approach which allows running...

Recent Posts