
Explore testing gRPC services with K6, covering data-driven, smoke and spike tests, and automating with Jenkins, Docker, and Kubernetes within a reusable framework.
Here we talk about setting up our sandboxed environment, ready to start creating our tests. This will include a set of gRPC tests.
In this lecture we talk about setting up the gRPC web services, so we can run our K6 tests against them. I talk about the proto files, the service an the implimentation.
Run a test
Finally we need to run a test to ensure that we are good to start the rest of the course and build our own gRPC tests.
Here is some instruction for windows only users
In this lecture we will talk about two teams in very different locations and time zones. What implications this has for the teams and what we can do to reduce the dependancy upon each other. Inter-dependancy can stop teams from focusing on their core objectives and can diminish time as developers wait to gain clarity.
Smoke testing offers clarity through implementation code, confidence through repeatability and self empowerment.
In this lecture we talk about the value that Reliability, Repeatability and Confidence can provide your team and business.
Regression is something that we need to protect against and a good set of automated tests run against as system on every commit can help prevent regression. In this lecture we discuss what regression is and how smoke test can reduce regression.
Lets make our first smoke test using K6 and start a journey to automated testing
We look at what and how to soak test and what the benefits of this type of tests are.
We look at what and how to load test and what the benefits of this type of tests are.
We look at what and how to spike test and what the benefits of this type of tests are.
We look at how to handle errors that don't seem to be handled by the k6 framework counts.
We look at the response object in its entirety
We look at two types of assertions check and Describe.
We start to create multiple test to include in our framework
Here we create a home for our smoke tests.
Lets look at reusing code for our checks
Here we focus on tests that test our failures and return positive results as expected behaviour
I explore environment vars, protecting sensitive data and authentication.
Here we add success and failure counters
We explore how to handle "google.protobuf.any" type
We now expand the any type to make our code data driven via a json object
Here we explore the OneOf proto Type
We add our test framework to jenkins and run it
We now modify our framework to abort a test run on the first failure and add a no colour mode
We add our framework to a kubernetes job using minikube
We explore staging multiple calls and passing returned data down the chain
We now add these staged calls to our framework and talk about how we can make them stand out from the other tests
Here we explore sharing one connection over multiple users at a concurrent rate of 3000
Here we show how to give each of the 3000 users their own connection, once and we look at he results side by side with the one connection for all tests and one connection per iteration of the tests.
Here we speak about adding random arguments to our gRPC calls on a per iteration bases to mimic what would happen in a live environment.
Here we speak about putting a threshold in and using our error counter from inside and outside of k6 to stop the performance test if they have went bad.
I no further refine the one connection per user code and further expand on our knowledge of init code.
In this course we take a look at what K6 has to offer the world of automation for gRPC tests. This course has been written so that windows, mac and linux users can follow along. I also explore other technologies that we can use to enhance this product into a framework that we can use to add more functionality to our arsenal.
What do you want from a gRPC test framework?:
A counter of successes and failures, with a no colour option.
Negative and positive test pass as intended.
Exit framework on first tests failure.
Dependant gRPC requests shown as part of your system
Data driven gRPC tests
The ability to run your gRPC framework on Kubernetes or Jenkins.
The ability to run our gRPC tests in parallel background tasks
The ability pin point exact errors on gRPC status code.
The ability to stage calls, so that interdependencies are maintained.
What do you want from your scaled up gRPC performance tests?:
The ability to have reliable tests that will report all errors and in turn give a true representation of your gRPC reliability.
The ability make these test simulate randomness of data input.
The option to share connection on a per user basis or over all iterations.
Self recovering tests that try to recover on failure
What do you want from your gRPC Micro Services?:
The ability to have confidence that a change has not broken anything.
The ability to say to managers in a matter of minutes that it works as it should.
the ability to work efficiently and independently from the consuming/producing team.
The ability to run tests as part of your CI/CD system
The ability to run tests at a scheduled time of day.
If the answer is yes to any of the above then this is the course for you. Also look a the rarer proto types such as "any" and "typeOf".