Let's go invent tomorrow instead of worrying about what happened yesterday|mail@jankowskimichal.pl

Testing

Unit tests – materials from trainings for quality engineers

I would like to invite you to familiarize with materials from training about unit tests. This training has been prepared as part of my work duties in Objectivity Bespoke Software Specialists. The main goal of this training was to learn quality engineers that work in Objectivity how to write unit tests. The training has been divided into two parts: Unit Tests - The Beginning – this is an introduction to unit tests; you will learn: what unit tests are, how to develop them correctly, how you can cooperate in project to build better unit tests, how unit tests work. Unit [...]

By |2017-01-18T21:54:10+01:0019 January 2017 |Categories: Conferences / Presentations, Testing|Tags: , |0 Comments

Lightning talk – Autofixture

I would like to encourage you to download and go through presentation from lighting talk about AutoFixture library. Main purpose of this library is to minimize the ‘Arrange’ phase of unit tests in order to maximize maintainability. Presentation is available on GitHub – AutoFixture - Lightning talk. You will find there description of main features of this library. Moreover, presentation contains short comparison AutoFixture with other available solutions. Of course on GitHub you will find code used in presentation.

SQL unit tests – coverage report

Nowadays, it is quite common to write unit tests for code that we are creating, but not for all programming languages. When we are writing code for www, desktop or mobile application we get used to write unit test for code that is related to application. Together with that we are not testing database code. It is correct when we are using some ORM tools because such tools generate code for us. Situation looks quite different when we are writing SQL code by our own. Then this code should be unit tested similar to other production code. To do that [...]

By |2016-09-09T21:48:17+02:0012 September 2016 |Categories: Testing|Tags: , , , |0 Comments

Mocking DbContext and DbSet with Moq

I believe that during your work with unit tests with applications that are using database for data storage you will need to isolate layer that is responsible for providing data. In this example I will use Entity Framework as ORM. Below you can find main elements of solution: public class User { public int Id { get; set; } public string Login { get; set; } public string Name { get; set; } public string Surname { get; set; } public bool AccountLocked { get; set; } public virtual List<Role> Roles { get; set; } } public class UsersContext [...]

By |2021-07-13T18:58:56+02:009 February 2016 |Categories: Testing|Tags: , , , , , , , |25 Comments

Moq + xUnit + AutoFixture – cheat sheet

Please find new cheat sheet that I created for following tools related to unit test: Moq, AutoFixture and xUnit. Moq - AutoFixture - xUnit - Cheat sheet page 1 Moq - AutoFixture - xUnit - Cheat sheet page 2 Provided cheat sheet is based on two articles: Moq Quickstart and AutoFixture Cheat Sheet. And the most important thing – link to .

By |2017-09-21T20:28:46+02:005 January 2016 |Categories: Testing|Tags: , , , |1 Comment

Learning tests

This is quite interesting idea that I found in Robect C. Martins’ book Clean Code: A Handbook of Agile Software Craftsmanship. With this idea you should write unit tests for 3rd part components. At the beginning it can look strange. Why should you do that? We buy 3rd part components to save money and time – we figure out that it will be cheaper and faster than our development process. We also believe that this components should be tested and should not have any errors. […]

By |2015-10-06T23:29:21+02:006 October 2015 |Categories: Testing|Tags: |0 Comments

Measuring memory usage in Windows Phone

One of the biggest gaps in performance counters is the lack of information about current memory usage. One of the requirements for the certification of applications on Windows Phone 7 is limitation to 90 MB memory usage by an application for phones with less memory than 256 MB. At the moment there is no phone on the market that meet this condition. Theoretically, we should not worry. However, according to the information from Microsoft the next generation operating system Windows Phone Tango should already allow for the production of low-budget phones with less memory. […]

By |2013-06-10T13:55:40+02:0012 March 2012 |Categories: Testing|Tags: , , , |3 Comments

Windows Phone applications testing

Testing is a wide topic. Each developer has own point of view on this issue. Therefore, I do not want to take part in topics related to the ideology. But I want to share a little discovery. Recently reviewing my tracked resources I found a solution, which enables the automation of tests on the platform Windows Phone 7. One drawback of this solution is limited to testing only on the emulator, but on the other hand, during the automatic testing that are made on build server the phone will probably not be connected. The second drawback is the use of [...]

By |2020-12-20T23:38:43+01:003 February 2012 |Categories: Testing|Tags: , , |1 Comment

Free tool for testing code coverage – PartCover

In the course of writing the code is already accustomed to this, that you should write tests in parallel. Approaches, when and how to write tests is much. The choice we have too few available test frameworks, but not what I wanted to write. In this article I want to touch on the test code coverage testing. […]

By |2012-05-20T07:13:22+02:007 February 2011 |Categories: Testing|Tags: , , , , , , |0 Comments
Go to Top