How to send notification to Microsoft Teams channel from TeamCity using PowerShell build step and how to make it reusable with meta runners.
Strona głównaUżytkownik
cezarypiatek | użytkownik
In my last post, I wrote about great HTTP client for .NET Core called RestEase and I showed how to use it as a simple proxy between API Gateway and microservice. Today I’ll present how this library can also simplify writing part of integration tests. Unit test vs integration test I assume that for some of you the term „integration test” may sounds odd, therefore I’d like to explain it first to avoid the possible confusion with a unit test later in this artic...
Sztuka programowania 2522 dni, 7 godzin, 25 minut temu 152 źrodło rozwiń
Wdrożenie procesu ciągłej integracji dla aplikacji .NET Core z wykorzystaniem narzędzia GitLab CI dla lokalnego Runnera.
Czasem robiąc code review rodzą się wątpliwości, czy dany kawałek kodu w ogóle działa albo czy przypadkiem nie psuje reszty systemu. Najlepiej w takiej sytuacji przed zamknięciem pull requesta po prostu to przetestować, ale do tego trzeba ściągnąć najnowszą wersję kodu, zbudować i uruchomić projekt a wcześniej odłożyć swoje zmiany na bok. Sam wiem po sobie, że często z tego rezygnowałem. Można jednak rozszerzyć swój proces CI/CD aby build server sam robił deploy każdego pull request’u na odrębne środowisko.
Sztuka programowania 2523 dni, 6 godzin, 42 minuty temu 67 źrodło rozwiń
I’ve recently watched a pretty decent tutorial about DSC on Microsoft Virtual Academy. I’m not a huge fan of video tutorials because it always takes more time to watch them than read a book/blog post (you can hack it by increasing video speed and save yourself a couple of minutes) but sometimes there is additional beneficial side effect - the presenter can show you (accidentally or not) some tips and tricks not strictly related to the core subject of the video. This post is an attempt of summarizing tric...
Each time I think about the problem with feedback, I recall the famous presentation of Erik Meijer “One hacker way“, when he says about the system developed without a proper feedback – no feedback loop – summed up with a sentence “That’s how Microsoft Office Ribbon was born”. I think I can see this Microsoft-Ribbon problem everywhere, not only at work but also in life. People tend to underestimate how much is it important to give, but also to receive feedback properly. It might also be that they...
I’ve recently written an article about managing TODOs in the codebase with TODOExplorer. I’ve also proposed an idea of introducing code snippet for TODOs which helps to keep all TODOs in predefined format as well as provides more information about delayed task (author, receiver, date, issue tracker id). This article was a result of a few discussions with my programmer-colleagues and I hoped that that idea of TODOs snippet was worth sharing (I’ve been using it in my project for a while). After publishing ...
Sztuka programowania 2556 dni, 8 godzin, 4 minuty temu 100 źrodło rozwiń
In order to keep your git environment in a good shape you need to clean up branches from time to time. It is especially difficult in case of build servers which complete pull requests on behalf of developers (like VSTS). It’s easy when you have just a few branches to review, but if you forget to do some cleaning for longer while then it’s getting painful. For sure you do not want to remove effects of your work by accident during cleanup.
Zawsze przychodzi ten moment gdy trzeba rozwiązać buga na produkcji i jedyne co mamy to logi aplikacji. Okazuje się oczywiście, że nie ma wszystkich informacji w tych logach. Nie ma nawet całkiem podstawowych informacji...
Sztuka programowania 2556 dni, 8 godzin, 4 minuty temu 146 źrodło rozwiń
Some people used to say that a good programmer doesn’t need to debug his own code. However, sometimes we have a problem with third party libraries usage, for example: there is insufficient documentation or the module contains some bugs. Visual Studio has excellent debugging toolset but this is totally useless without symbols and sources (and this is often the case with third party libraries). Thanks to Reshaper decompiler this shouldn’t be a problem anymore. Before we start debugging we should make so...
W skrócie jak ustawić czas systemowy z poziomu .neta, a przy okazji jak wywołać funkcję z pewnej dllki.
It’s a good practice to make all things done at the first approach. But in the real world it’s ot always possible - for example we need to ask customer for clarification and it will take some time, or worst - we don’t have enough time right now to implement things in the right way. In order to adress this issue, a TODO was invented to mark all those places in code requiring additional work. But the main disadvantage of TODO is that we mark code with it, commit it and forget about it. Sometimes somebody a...
Staram się automatyzować wiele rzeczy. Build skrypt przechodzący lokalnie i na serverze po każdym commit’ie to podstawa. Można to w prosty sposób zrobić. Jest jednak część rzeczy, które są zbyt trudne do automatyzacji, albo po prostu nie da się ich zautomatyzować. ...
Sztuka programowania 2600 dni, 7 godzin, 4 minuty temu 113 źrodło rozwiń
W pliku AssemblyInfo.cs zawsze widzę dużo śmieci. Przy kilkunastu/kilkudziesięciu projektach tych śmiecie jest liniowo więcej. Może czasem niektóre z nich w Waszym kontekście są potrzebne. Moje doświadczenia są jednak takie, że ten plik mógłby być tylko jeden i wyglądać: [assembly: System.Reflection.AssemblyVersion("1.0.0")]
Architektura 2611 dni, 6 godzin, 51 minut temu 200 źrodło rozwiń
Buduję właśnie nugeta z solucji, która ma ponad 20 projektów. Ok 10 z nich ma wylądować w paczce. Paczka ta jest silnikiem obliczeniowym i będzie konsumowana przez większy system wewnątrz firmy. Nuget będzie hostowany tylko wewnętrznie. Wygląda to tak ...
When I browse StackOverflow questions tagged with selenium label, a lot of them are related to the problem of clicking on page elements. It seems to be one of the most trivial tasks, but can cause a lot of problems. Very often invoking Click() action on webelement ends with exceptions (there is a wide range of them). The main reason is that element on which we try to click is not in “Interactable” state. There is a lot of different factors that can cause that situation:Element has zero dimension (width ...
Static analysis is a powerful feature of Visual Studio that helps us to spot syntax and semantic errors in our code. It works very well on currently edited file and runs on the whole solution as one of the compilation stages. But it would be a waste of time to run compilation every time you make changes that affect code outside currently edited file, only to check that you didn't cause any compilation errors. Luckily, Resharper comes to the rescue with...
Debugging complex exceptions with $exception pseudovariable
TortoiseSVN has a function named simply “rename” which allows you to change the file name and keep the file history as well. But what if we change the file name for example during refactoring using Visual Studio? Are we fated to lose file history?
One of the greatest features of Resharper are Live Templates. They can speed up your code typing and help you focus only on what is most important (you don’t need to remember and retype anymore long ‘dull’ code constructions). Live Templates are similar to Visual Studio code snippets but are easier to define and introduce smart parameters that help you in faster code completion.