Setting up the test matrix in XUnit is not so easy as it might seem. This summarises my struggles with adding System.Text.Json support to Marten and setting our test matrix to run the whole test suite for both serialisers.
Sztuka programowania 1368 dni, 1 godzinę, 11 minut temu 51 źrodło rozwiń
Cypress & ExtJS – testy e2e. Króki wpis o tym jak zitnegrować ze sobą te dwie biblioteki i o moich pierwszych krokach w temacie testów pisanych w JavaScripcie.
Today I’d like to share with you a very interesting concept in software testing – Assert Object pattern. It makes the Assert part of a test much simpler and more readable. Let’s dive right into it 😉The Asserts Hell Let’s consider the following unit test: What’s wrong here? Given and When sections are great single-liners. We know straightaway what’s the input and the action executed. However, Then block is too complex. It’s hard to figure out, just passing quickly through this test, what is expected. T...
Sztuka programowania 1472 dni, 1 godzinę, 11 minut temu 65 źrodło rozwiń
Nie wyobrażam sobie programowania bez pisania testów. Gdy śpieszy mi się i o nich „zapominam”, potem i tak poprawiam kod przez jakąś głupotę. Poprawiają jakość i przyśpieszają czas tworzenia oprogramowania. Nie wierzysz?Spis treścihide1Rozkład jazdy2Co zyskamy?3Zależności4Testowalny kod Kafka Streams5Test 1 – LowercaseStreamTopologyTestDriverTest właściwy6Test 2 – SerDeJsonStream7Repozytorium8WnioskiPodobneRozkład jazdyKafka Streams 101 – de/serilizacjaKafka Streams 102 – Wyjątki i Dead Letter QueueKafka...
Sztuka programowania 1682 dni, 2 godziny, 18 minut temu 43 źrodło rozwiń
When it comes to writing maintainable UI test there always appears the term of Page Object Pattern. For those who are not familiar with Page Object, it’s the approach to building UI test that focuses on creating high-level abstraction over low-level details related to interaction with a tested application. This testing interface encapsulates all the noise related to technology and allows to clearly express intention of test cases. This concept is very well described...
Sztuka programowania 2299 dni, 2 godziny, 10 minut temu 83 źrodło rozwiń
Page Object pattern is well-known in the world of test automation. Fortunately the new version (v4) of webdriver.io test automation framework was designed with Page Object pattern in mind, so we can fully benefit from this approach. One of advanced concepts of Page Object pattern is components sharing – today we will take a closer look at this.
While looking for some efficient solution to mock (or autogenerate) some testing data I stumbled upon this funny-named library called Bogus. I tried and compared it with another well-known library called AutoFixture. They’re both powerful and can speed up tedious manual object initialization. I was looking for a solution that would work with Entity Framework and our database models which required that some selected properties were always not-null. Also, just for my own...
Inspired by Piotr’s article I decided to play a little with the Bitbucket as an alternative to the GitHub. The thing that I really like about it, is that there’s no need to use any 3rd part CI tool such as TravisCI since Bitbucket offers its own build pipeline. Of course, I wanted to test it as soon as possible, so I created very simple Aurelia application using its CLI and I pushed my changes. My basic pipeline file (with the *.yml extension) presented as follows: ...
Generic classes tests mechanism using NUnit with test cases
Sztuka programowania 3106 dni, 23 godziny, 22 minuty temu 79 źrodło rozwiń
Opis jak szybko skonfigurować testy integracyjne dla WebAPI przy użyciu OWIN
Sztuka programowania 3138 dni, 1 godzinę, 42 minuty temu 89 źrodło rozwiń
I’m a big fan of using conventions when developing applications. I blogged about it in the past (here, here and later here). I also gave a talk about my experience with this approach and how I currently use it at NDC last week (slides are available here, video is here). One problem I faced when trying to build convention validation tests was lack of simple API that would allow me to build the validation rules for my tests. I built a spike of such library (call...
Sztuka programowania 4530 dni, 4 godziny, 32 minuty temu 80 źrodło rozwiń
W dzisiejszych czasach nikt już sobie nie wyobraża dobrze zaprojektowanej aplikacji biznesowej bez testów jednostkowych. Istnieją metodologie, które wręcz testy jednostkowe stawiają na pierwszym miejscu. Spring.NET idzie z duchem czasu i posiada wsparcie dla testów jednostkowych przy użyciu NUnit. Bądź co bądź to nadal najp...