📜 ⬆️ ⬇️

FitNesse + TeamCity - add tone to the project

Good day, lovers clamp the constructed system in a variety of tests! Many of you use the tools to create system tests. Someone even uses FitNesse , which was talked a bit about in Habré. Therefore, I will not repeat and write about what FitNesse is and what it is eaten with. I'd better tell you how to make the project “do fitness” during the build process, which proceeds with the help of TeamCity .
Interesting? Then welcome under cat.

So, given:

  1. A project written in PHP that needs an external framework of tests. The developer wants to be sure that after making changes, the end user will see exactly what he has seen before, plus a new feature. And not a new thing and a sharp UOS of the neighboring module for managing reports.
  2. System tests for controlling UI via Selenium Webdriver, written on the basis of PHPUnit. They have 2 flaws, namely:
    • The tester must know PHP, PHPUnit, Webdriver API. And at the same time write clean code that can read not only him.

      Let's make life easier for him already :)
    • Therefore, the existing tests are written in such a way that supporting them is a dark and ungrateful business. Even darker and more ungrateful is the situation when programmers fail to understand right away, and why, in fact, the test failed. And you have to spend time ...

  3. Automatically build a project and run all the tests with TeamCity
  4. A number of UI tests managed by FitNesse. More readable than written in PHP, and anyone can open our FitNesse-wiki and run any test. And even the managers understand what is happening on the screen there :). However, when building a project, these tests do not automatically run.

Decision.

We will decide the last fad by crossing TeamCity Buildrunner and FitNesse. You can do this in different ways: you can independently configure a bunch of FitNesse runner + TeamCity , or you can go in a simple way and use a specially trained plug-in . From the box, the plugin is able to run FitNesse at the path specified in the settings, run the tests and issue brief statistics. In general, a miracle, but frustrating as follows:

Therefore, our team decided to take the plugin, finish it under our fantastic requirements and share it with the community. A sawn-through plugin is available on GitHub .
I will briefly describe the installation and configuration process. In general, it is similar to the one described in the README of the original plug-in, but now FitNesse should be run by someone on BuilAgent in advance. And since He will rustle there all the time, at any moment you can go in and run any test you like with your hands.

Answer.

Approximately such pictures we will be able to observe at the exit. This will be seen in the test results:


And this is in the buil logs:

For complete happiness, it remains to make the links work “as links,” in which this article can help. But this is a discussion of another plan.

What is the profit from FitNesse?

First, once having developed and documented the API that is available from FitNesse, the tester will no longer have to ask to write PHP code. He has a single tool - Wiki markup, which he writes test scripts and documentation at the same time. If you need a new API handle, it will not be written by the tester, but by the development team. Which actually pay money for the code :).
Secondly, you can maintain documentation on the system directly on the page with tests. New employees will be useful to dig deeper with such a knowledge base. Yes, and the style of writing FitNesse tests is much more convenient for perception by a person familiar with the English language. If you wish, you can even show to managers — let them see that “PANIC !!”, “and it really works :).
')
To the community.

Please do not judge the plugin too strictly - it is still “young and inexperienced” :) If you are interested in someone, do not hesitate to finish / hang it up as your heart desires. And let all be good.

Source: https://habr.com/ru/post/154725/


All Articles