<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Paweł Ruciński</title>
    <description>The latest articles on DEV Community by Paweł Ruciński (@meanin).</description>
    <link>https://dev.to/meanin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F34879%2F2a9454d2-4275-4894-bca9-acd3e1ac46ab.jpg</url>
      <title>DEV Community: Paweł Ruciński</title>
      <link>https://dev.to/meanin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/meanin"/>
    <language>en</language>
    <item>
      <title>Running own opensource project</title>
      <dc:creator>Paweł Ruciński</dc:creator>
      <pubDate>Tue, 08 Jan 2019 13:07:46 +0000</pubDate>
      <link>https://dev.to/meanin/running-own-opensource-project-2o8</link>
      <guid>https://dev.to/meanin/running-own-opensource-project-2o8</guid>
      <description>&lt;p&gt;I have always wanted to start an opensource project. A year ago or so I was trying, with a few friends, to write a portal to rate craft beers. There are plenty of apps like this, but this was supposed to be a way to learn something new. As it always turns out, no one besides me had time to focus on the project. Within 3-5 weeks we abandoned the whole idea. I started to doubt if there is any sense in working that way in my off hours.&lt;/p&gt;

&lt;h1&gt;
  
  
  Change
&lt;/h1&gt;

&lt;p&gt;After I changed my job, I started to have more challenging tasks. A few of them made me create a PoC project, which I put on my &lt;a href="https://github.com/meanin"&gt;github&lt;/a&gt;. With time passing by, I came back to writing on dev.to. In that time I created a &lt;a href="https://github.com/meanin/vsts-tasks"&gt;project&lt;/a&gt; to support CI/CD processes on Azure DevOps, also documented on this portal :). And then it came to me - Let's give it a try, again. So I asked myself, is there anything which would help me in regular work, which I am missing? Recently, I have started giving technical interviews. I was doing this by filling some excel files. It was annoying, ineffective etc. And that's how I found my idea for an opensource project.&lt;/p&gt;

&lt;h1&gt;
  
  
  Technology
&lt;/h1&gt;

&lt;p&gt;I am mainly backend .net developer. I know something about Azure Cloud. It was obvious that my project will be based on that technology. A cloud-based, web application which supports technical interviews. Ok, I decided about the backend, but it would need some frontend as well. Should I use React? Or Angular? Or some other? Naaaaaah. Dotnet rocks, right? Recently, I have found an article about a .net SPA framework. I dug into that. It is currently an unsupported experimental web framework, but hey, it is dotnet and this will be something that I want to work with. The framework is called &lt;a href="https://blazor.net/"&gt;Blazor&lt;/a&gt;. As the docs say: &lt;code&gt;Browser + Razor = Blazor&lt;/code&gt;!&lt;/p&gt;

&lt;h1&gt;
  
  
  Get the fellows on board
&lt;/h1&gt;

&lt;p&gt;I didn't have any expectations at the time. I did not want to force anybody to contribute. I started this alone and made a few first steps, to get a scaffolded app working. I created a repository on GitHub, downloaded the aforementioned framework and started learning. Few friends follow me on GitHub. They started asking about the project because they also heard something about that framework and wanted to learn it from a scratch.&lt;/p&gt;

&lt;p&gt;After some time I was looking at new GitHub features. One of them is the project board. It helps to organize work for a project. I created a project to get to know how it works. It looks like a kanban board. I guess that we can use it as a scrum board for a single sprint. So I created one. Filled it with GitHub issues which described what I wanted to achieve with the project.&lt;/p&gt;

&lt;p&gt;When tasks (&lt;code&gt;issues&lt;/code&gt;) arrived, I asked my friends if they wanted to help. Currently, we are getting really close to version 1.0 of our app. They are happy to participate. They have done some tasks and so have I. It is really going in the right direction.&lt;/p&gt;

&lt;h1&gt;
  
  
  P.S.
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;How do you start your opensource projects? &lt;/li&gt;
&lt;li&gt;Do you use GitHub's project board?&lt;/li&gt;
&lt;li&gt;How to organize a project on GitHub differently?&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>opensource</category>
      <category>github</category>
    </item>
    <item>
      <title>What is your git merge strategy?</title>
      <dc:creator>Paweł Ruciński</dc:creator>
      <pubDate>Mon, 07 Jan 2019 10:37:11 +0000</pubDate>
      <link>https://dev.to/meanin/what-is-your-git-merge-strategy-2a1k</link>
      <guid>https://dev.to/meanin/what-is-your-git-merge-strategy-2a1k</guid>
      <description>&lt;h1&gt;
  
  
  Branching
&lt;/h1&gt;

&lt;p&gt;Branching out is a common first step as you work on a new task. &lt;code&gt;git checkout -b 'name of your brand new branch'&lt;/code&gt; should be familiar for most of you. This routine keep root branch (master/ develop whatever) clean, until someone finishes her/his work. Then you have to somehow put your changes into the root branch.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MbPkwf8X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://git-scm.com/figures/18333fig0315-tn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MbPkwf8X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://git-scm.com/figures/18333fig0315-tn.png" alt="img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Merge
&lt;/h1&gt;

&lt;p&gt;The default strategy, for integrating changes into a root branch is merge operation. Of course, if you meet any conflicts, you have to resolve them, but finally, the code base will be integrated. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CPr3Z3lT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://git-scm.com/figures/18333fig0317-tn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CPr3Z3lT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://git-scm.com/figures/18333fig0317-tn.png" alt="merge"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Squash
&lt;/h1&gt;

&lt;p&gt;There is an option while merging changes, to use &lt;code&gt;--squash&lt;/code&gt;. You will end up with one merge commit, put on top of the root branch history. From my perspective, this method is really risky. When a team does not stick to the pull requests/branch naming convention, it can have dramatic consequences. Imagine going back in the repository history through commit named &lt;code&gt;update&lt;/code&gt;, &lt;code&gt;align with newer version&lt;/code&gt;, &lt;code&gt;test&lt;/code&gt;, &lt;code&gt;more tests&lt;/code&gt;, etc. This option will simplify history view, but it is only for mature teams.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GyFASwMu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/meanin/dev-to-articles/master/img/2019-01-07-git-merge-strategy/squash.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GyFASwMu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/meanin/dev-to-articles/master/img/2019-01-07-git-merge-strategy/squash.png" alt="squash"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Mix
&lt;/h1&gt;

&lt;p&gt;While I was doing a research for this article, I found &lt;a href="https://blog.carbonfive.com/2017/08/28/always-squash-and-rebase-your-git-commits/"&gt;this&lt;/a&gt;. A really nice mix of the merge and squash in a single approach. Again, here you will need a mature team, to follow the naming convention, but is a nice consensus.&lt;/p&gt;

&lt;h1&gt;
  
  
  Question?
&lt;/h1&gt;

&lt;p&gt;Personally, I prefer to use standard merge. I have met teams, which use a &lt;code&gt;--squash&lt;/code&gt; option for all of the feature branch merge and I can see the pros of this approach. I miss detailed git history in that scenario after all. What is your default merge strategy?&lt;/p&gt;

&lt;p&gt;Images source: &lt;a href="https://git-scm.com/book/en/v1/Git-Branching-Basic-Branching-and-Merging"&gt;git-branching-and-merging&lt;/a&gt;&lt;/p&gt;

</description>
      <category>git</category>
      <category>help</category>
      <category>bestpractices</category>
    </item>
    <item>
      <title>Deploy a complete environment</title>
      <dc:creator>Paweł Ruciński</dc:creator>
      <pubDate>Wed, 21 Nov 2018 10:43:04 +0000</pubDate>
      <link>https://dev.to/meanin/deploy-a-complete-environment-a12</link>
      <guid>https://dev.to/meanin/deploy-a-complete-environment-a12</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;Continuous Integration helps teams work in parallel on the same project. The most common scenario is to use some git server and integrate work as a pull request from a feature branch to development one. Many tools provide an easy way to build an artefact (installation package) from a merged code base. Continuous deployment is a way to maintain application state with the newest code base on the desired environment.&lt;/p&gt;

&lt;p&gt;Imagine that before pushing new changes to production, you want to make all of the tests in a dedicated environment. Or maybe on every newly created environment you want to seed some data? Sometimes on this specific environment data stored/missing can introduce unnecessary bugs or unwanted situations which require your attention, before it can be considered tested/usable.&lt;/p&gt;

&lt;h1&gt;
  
  
  Idea
&lt;/h1&gt;

&lt;p&gt;I came up with an idea on how to create a brand new environment, just for testing purposes. This way, you can always be sure, that there is no old data, but only data that is required for the system to work the right way. Nothing will interfere with test cases, no blockers on a fresh start. &lt;/p&gt;

&lt;p&gt;I am using Microsoft Azure Cloud, as it is most familiar to me. In the simplest case, I want to create a storage (Azure Table Storage), pass its connection string to the key vault (centralized storage for secrets), seed data there and finally deploy an application which will consume the data.&lt;/p&gt;

&lt;h1&gt;
  
  
  Solution
&lt;/h1&gt;

&lt;h3&gt;
  
  
  1. Create a storage account
&lt;/h3&gt;

&lt;p&gt;There are few ways to create a storage account on Microsoft Azure Cloud. For a start, there is an Azure Portal - the web interface for managing your cloud resources. If you are more familiar with devops' work, you would use &lt;a href="https://docs.microsoft.com/en-us/powershell/azure/overview?view=azurermps-6.12.0"&gt;Azure Powershell&lt;/a&gt; (cross-platform right now) or &lt;a href="https://docs.microsoft.com/en-us/cli/azure/?view=azure-cli-latest"&gt;Azure CLI&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In my scenario, I want to integrate the storage account creation process with continuous deployment process. I could write some PowerShell script and add it as a step to my CD definition. I could also write some custom extension for my CI/CD tool, which would give me a nice view for creating new storage account :) I am working with &lt;a href="https://azure.microsoft.com/en-us/services/devops/"&gt;Azure DevOps&lt;/a&gt; (which is a successor to Visual Studio Team Services). After some fights with diving into Azure DevOps extension development, I ended up with something like described on one of my previous posts:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/meanin" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5Qw3owqh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--VbnjdcWt--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/34879/2a9454d2-4275-4894-bca9-acd3e1ac46ab.jpg" alt="meanin image"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/meanin/create-azure-storage-account-on-release-pipeline-4kn4" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Create Azure Storage Account on release pipeline&lt;/h2&gt;
      &lt;h3&gt;Paweł Ruciński ・ Oct  8 '18 ・ 2 min read&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#devops&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#azure&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#microservices&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;It looks like below. Nice right? Instead of fighting with some PowerShell you can consume well-designed UI for creating the resource you need.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HFQNHPLw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/meanin/vsts-tasks/master/screenshots/createstorageaccount.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HFQNHPLw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/meanin/vsts-tasks/master/screenshots/createstorageaccount.png" alt="img"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  2. Pass connection string to Key Vault
&lt;/h3&gt;

&lt;p&gt;Using a different database/storage in each environment could be difficult. One way is to use a dedicated configuration file for each environment, but then credentials are stored in a version control system. The second way is to configure a dedicated hosting environment to have credentials stored there, but it creates a problem with configuring the new environment. All credentials need to be known before anything is deployed.&lt;/p&gt;

&lt;p&gt;Happily, there is another way, which is my favourite. Store all of the necessary credentials outside of source control and fetch real values (override configuration file) on CD process. It can be done in a dedicated centralized storage for secrets. The Microsoft Azure Cloud provides a component that is called &lt;a href="https://docs.microsoft.com/en-us/azure/key-vault/key-vault-overview"&gt;Azure Key Vault&lt;/a&gt;. The Azure DevOps portal provides an easy way to fetch data from a key vault, you can read more about it on &lt;a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/library/variable-groups?view=vsts&amp;amp;tabs=yaml"&gt;Microsoft docs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So I came up with an idea to push a connection string for my newly created Storage Account to the selected Key Vault during the CD process, just after creation is completed. I didn't find any existing way to do that, besides inline PowerShell/CLI script. I decided to create another task for the Azure DevOps, also described in a dedicated post:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/meanin" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5Qw3owqh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--VbnjdcWt--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/34879/2a9454d2-4275-4894-bca9-acd3e1ac46ab.jpg" alt="meanin image"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/meanin/pass-storage-account-connection-string-to-key-vault-on-release-pipeline-1pkl" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Pass Storage Account connection string to Key Vault on release pipeline&lt;/h2&gt;
      &lt;h3&gt;Paweł Ruciński ・ Oct 17 '18 ・ 2 min read&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#devops&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#azure&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;As previously, I believe that developers who work on a code base, shouldn't care about configuring deployment scripts. It looks like below:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K70qsoKi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/meanin/vsts-tasks/master/screenshots/connectionstringtokeyvault.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K70qsoKi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/meanin/vsts-tasks/master/screenshots/connectionstringtokeyvault.png" alt="img"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Seed Table Storage
&lt;/h3&gt;

&lt;p&gt;Have you ever store data without which product won't work on a database side? Data that is not permanent, that mutate during application lifetime, so there is need to be stored in a DB, but without which application will not start. I imagine some user configuration values, defaults that are handled by admin, etc. For that case, usually missing part is seed functionality. Again I cannot find anything that works out of the box. &lt;/p&gt;

&lt;p&gt;The more I get into developing the Azure DevOps extension, the more idea for new tasks I find. Now I created one that helps to seed data into the Azure Table Storage. See my post:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/meanin" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5Qw3owqh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--VbnjdcWt--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/34879/2a9454d2-4275-4894-bca9-acd3e1ac46ab.jpg" alt="meanin image"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/meanin/seed-table-storage-10an" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Seed Table Storage&lt;/h2&gt;
      &lt;h3&gt;Paweł Ruciński ・ Nov 13 '18 ・ 2 min read&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#devops&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#azure&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#microservices&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
It needs an input JSON file, with predefined two fields which are Azure Table Storage restriction - PartitionKey and RowKey. Any other field can names as needed by an application. The task configuration needs an Azure subscription, Storage Account Name, table name and of course path to seed file. In this case, it is a local JSON file.&lt;br&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9WNRid2E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/meanin/vsts-tasks/master/screenshots/seedtablestorage.png" alt="img"&gt;
&lt;h3&gt;
  
  
  4. Application deployment
&lt;/h3&gt;

&lt;p&gt;A default way to host an application in an Azure Cloud is to deploy it to an App Service. It supports multiple languages like c#/.net, Java, PHP, static websites (Angular/React/others), even node.js or python. It is able to use Windows OS, Linux, or docker container. Review the Microsoft documentation to learn &lt;a href="https://docs.microsoft.com/en-us/azure/app-service/app-service-web-overview"&gt;more&lt;/a&gt;. Configuration is pretty straightforward. There are few fields that need your attention, like Azure subscription, App type and App Service Name. For more information, please visit this &lt;a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/targets/webapp?toc=/azure/devops/deploy-azure/toc.json&amp;amp;bc=/azure/devops/deploy-azure/breadcrumb/toc.json&amp;amp;view=vsts"&gt;page&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;With some effort, now I am able to deploy a complete environment through the Azure DevOps release pipeline. A Storage Account/table is created as a first step. The connection string is passed to the Key Vault as secret. Next desired table is filled with seed data. Last, the application is deployed with credentials fetched from the Key Vault, configuration values are overwritten. From the developer's perspective, it is transparent to which database, which table application is writing/reading to/from on this specific environment. They can focus on delivering functionality, instead of fighting with deployment process, connection strings, validation, credentials, etc. &lt;/p&gt;

&lt;p&gt;For the end, I prepared short asp.net core demo project, which reads all data from the Azure Table Storage table and presents it on a website. A code base can be found on my github:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/meanin"&gt;
        meanin
      &lt;/a&gt; / &lt;a href="https://github.com/meanin/asp-net-core-azure-storage-account"&gt;
        asp-net-core-azure-storage-account
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
asp-net-core-azure-storage-account&lt;/h1&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/meanin/asp-net-core-azure-storage-account"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;&lt;br&gt;
As you can see in the config file, there is only connection string to a local emulator, instead of real Azure Table Storage instance.&lt;br&gt;&lt;br&gt;


&lt;div class="highlight"&gt;&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="s"&gt;"Logging"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s"&gt;"LogLevel"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="s"&gt;"Default"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"Warning"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="s"&gt;"AllowedHosts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"*"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s"&gt;"ConnectionString"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"UseDevelopmentStorage=true"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s"&gt;"DemoTableName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"MyTable"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Also included is a seed.json file, which could be fetched from somewhere else, but for simplicity it is stored within a code base.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[
  {
    "PartitionKey": "partitionKey1",
    "RowKey": "1",
    "OtherColumn": "value1",
    "FourthColumn": "123"
  }    ...
]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;A few minutes after triggering release, I saw this, brand new web application, displaying a table the source code base knows nothing about. Voila!&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PiiA0fTT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/meanin/dev-to-articles/master/img/2018-11-21-deploy-complete-environment/deployed-application.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PiiA0fTT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/meanin/dev-to-articles/master/img/2018-11-21-deploy-complete-environment/deployed-application.png" alt="img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  P.S.
&lt;/h1&gt;

&lt;p&gt;No, not PowerShell ;) If you have any needs to extend the Azure DevOps, with some shiny new deployment task, you can contact me :)&lt;/p&gt;

</description>
      <category>devops</category>
      <category>azure</category>
      <category>dotnetcore</category>
    </item>
    <item>
      <title>Seed Table Storage</title>
      <dc:creator>Paweł Ruciński</dc:creator>
      <pubDate>Tue, 13 Nov 2018 10:46:51 +0000</pubDate>
      <link>https://dev.to/meanin/seed-table-storage-10an</link>
      <guid>https://dev.to/meanin/seed-table-storage-10an</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;I wrote a few sentences about an Azure Cloud &lt;a href="https://dev.to/meanin/create-azure-storage-account-on-release-pipeline-4kn4"&gt;here&lt;/a&gt;. When you are deploying an application, sometimes you need some basics data already be placed in a database. Some prerequisites, without which an application will work in a wrong manner. Seeding and migrating SQL databases in a .net world is a well-described topic. If you know Entity Framework or Hibernate, you know where to start. What to do with this, when you want to store data in an Azure Table Storage?&lt;/p&gt;

&lt;h1&gt;
  
  
  Install extension
&lt;/h1&gt;

&lt;p&gt;To install this extension, you need an organization on Azure DevOps portal. You can start &lt;a href="https://azure.microsoft.com/en-us/services/devops/?nav=min" rel="noopener noreferrer"&gt;here&lt;/a&gt;. On this portal, you have to have rights to install extensions. Then navigate &lt;a href="https://marketplace.visualstudio.com/items?itemName=meanin.storage-account-managment" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Configure task
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffarw4kgz8grc69hofdiw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffarw4kgz8grc69hofdiw.png" alt="img" width="800" height="288"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To use this task you have to have a &lt;a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=vsts#sep-azure-rm" rel="noopener noreferrer"&gt;configured&lt;/a&gt; Azure Resource Manager connection with a Service Principal. Set a storage account name and a table name which you want to seed. Select a JSON file location. The file has to be a JArray of a flat object, which everyone contains at least two properties: PrimaryKey and RowKey.&lt;br&gt;
Here is a little example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[
    {
        "partitionKey": "partitionKey1",
        "rowKey": "1",
        "otherColumn": "value1",
        "fourthColumn": "123"
    },
    {
        "partitionKey": "partitionKey1",
        "rowKey": "2",
        "otherColumn": "value2",
        "fourthColumn": "123"
    },
    {
        "partitionKey": "partitionKey2",
        "rowKey": "1",
        "otherColumn": "value1"
    },
    {
        "partitionKey": "partitionKey2",
        "rowKey": "2",
        "otherColumn": "value1"
    }
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After release, table with data looks like below:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ABbkp3cg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/meanin/dev-to-articles/master/img/2018-mm-dd-seed-table-storage/seed-table.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ABbkp3cg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/meanin/dev-to-articles/master/img/2018-mm-dd-seed-table-storage/seed-table.png" alt="img" width="628" height="134"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the first published version of this task. I will appreciate all feedback :)&lt;/p&gt;

</description>
      <category>devops</category>
      <category>azure</category>
      <category>microservices</category>
    </item>
    <item>
      <title>Pass Storage Account connection string to Key Vault on release pipeline</title>
      <dc:creator>Paweł Ruciński</dc:creator>
      <pubDate>Wed, 17 Oct 2018 13:41:33 +0000</pubDate>
      <link>https://dev.to/meanin/pass-storage-account-connection-string-to-key-vault-on-release-pipeline-1pkl</link>
      <guid>https://dev.to/meanin/pass-storage-account-connection-string-to-key-vault-on-release-pipeline-1pkl</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;I wrote a few sentences about an Azure Cloud &lt;a href="https://dev.to/meanin/create-azure-storage-account-on-release-pipeline-4kn4"&gt;here&lt;/a&gt;. Most of the release pipelines change somehow app configuration to align it with a new environment. For a database connection, usually, we inject a connection string into the mentioned configuration. Where do you get from a connection string? From a database, you say. But how to achieve the same, when a database is created on the same release pipeline?&lt;/p&gt;

&lt;p&gt;This was a missing part for me, to create a fully operational environment on release pipeline from tasks available on an Azure DevOps. Sure there is &lt;a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/apps/cd/azure/deploy-provision-azure-vm?view=vsts"&gt;ARM template deployment&lt;/a&gt;, but I am not a big fan of it.&lt;/p&gt;

&lt;p&gt;I decided to create my own task which will take a connection string and pass it to a &lt;a href="https://docs.microsoft.com/en-us/azure/key-vault/key-vault-overview"&gt;Key Vault&lt;/a&gt; - Safe store for your secrets, keys and certificates. &lt;/p&gt;

&lt;h1&gt;
  
  
  Install extension
&lt;/h1&gt;

&lt;p&gt;To install this extension, you need an organization on Azure DevOps portal. You can start &lt;a href="https://azure.microsoft.com/en-us/services/devops/?nav=min"&gt;here&lt;/a&gt;. On this portal, you have to have rights to install extensions. Then navigate &lt;a href="https://marketplace.visualstudio.com/items?itemName=meanin.storage-account-managment"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Configure task
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K70qsoKi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/meanin/vsts-tasks/master/screenshots/connectionstringtokeyvault.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K70qsoKi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/meanin/vsts-tasks/master/screenshots/connectionstringtokeyvault.png" alt="img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To use this task you have to have a &lt;a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=vsts#sep-azure-rm"&gt;configured&lt;/a&gt; Azure Resource Manager connection with a Service Principal. Set a storage account name which connection string you want to pass into a Key Vault. Set a Key Vault name (if it does not exist, it will be created now). Set a Key name. If your Key Vault does not exist yet, you can set a location for it, or it will inherit location from a Resource Group (scoped by a Service Principal). And voila', after task execution is completed, your key is securely stored in a Key Vault.&lt;/p&gt;

&lt;p&gt;This is the first published version of this task. I will appreciate all feedback :)&lt;/p&gt;

</description>
      <category>devops</category>
      <category>azure</category>
    </item>
    <item>
      <title>Create Azure Storage Account on release pipeline</title>
      <dc:creator>Paweł Ruciński</dc:creator>
      <pubDate>Mon, 08 Oct 2018 13:03:49 +0000</pubDate>
      <link>https://dev.to/meanin/create-azure-storage-account-on-release-pipeline-4kn4</link>
      <guid>https://dev.to/meanin/create-azure-storage-account-on-release-pipeline-4kn4</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;Azure is a cloud platform, that grows more and more popular. Configuring CI/CD on an Azure DevOps is a really nice experience. You can create a build pipeline, where your software will be built and packaged into an installation artefact. You can also create a whole release pipeline. Usually only deploying the artefact to some &lt;code&gt;cloud&lt;/code&gt; space. While I was playing with it, I miss some tasks which will prepare a brand new environment on my behalf.&lt;/p&gt;

&lt;p&gt;Imagine that you can have multiple environments, consisting of a great number of services, each connected to a different database. You are creating a new one and want to check if all others work well, that nothing is broken by the new one. I would create a whole new environment, deploy there infrastructure, deploy services and run unit tests, integration tests and regression tests to be sure, that all components are in a good health.&lt;/p&gt;

&lt;p&gt;The parts that I cannot find on an Azure DevOps platform are tasks which enable me to create databases and store connection strings, securely. Later on a deployment, pass this connection string into service configuration, without passing it as a plain text to any solution file. And that is how I start working on Azure DevOps extensions.&lt;/p&gt;

&lt;h1&gt;
  
  
  Install extension
&lt;/h1&gt;

&lt;p&gt;An &lt;a href="https://docs.microsoft.com/en-us/azure/storage/common/storage-account-overview" rel="noopener noreferrer"&gt;Azure Storage Account&lt;/a&gt; contains all of your Azure Storage data objects: blobs, files, queues, tables, and disks. The table storage is a basic NoSQL database available on the Azure cloud. Simple document database for storing non-relational data. I will focus on that now.&lt;/p&gt;

&lt;p&gt;To install this extension, you need an organization on Azure DevOps portal. You can start &lt;a href="https://azure.microsoft.com/en-us/services/devops/?nav=min" rel="noopener noreferrer"&gt;here&lt;/a&gt;. On this portal, you have to have rights to install extensions. Then navigate &lt;a href="https://marketplace.visualstudio.com/items?itemName=meanin.storage-account-managment" rel="noopener noreferrer"&gt;here&lt;/a&gt;, or search for a &lt;code&gt;manage storage account release tools&lt;/code&gt; in a release pipeline window like below:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1yai2sjxlv6g28boppou.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1yai2sjxlv6g28boppou.png" alt="img" width="800" height="267"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Configure task
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5hdr1nb8v7jc2m41rkqz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5hdr1nb8v7jc2m41rkqz.png" alt="img1" width="800" height="442"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To use this task you have to have a &lt;a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=vsts#sep-azure-rm" rel="noopener noreferrer"&gt;configured&lt;/a&gt; Azure Resource Manager connection with a Service Principal. Set your new storage account name (it is required, but if the storage account exists, it won't break anything). Set location for your storage account, you can keep it default, then it will be inherited from a resource group location. Last required thing is to set &lt;a href="https://docs.microsoft.com/en-us/rest/api/storagerp/skus/list" rel="noopener noreferrer"&gt;Sku&lt;/a&gt; (Performance tiers). If you want to, you can create a table in a table storage by setting a name for it.&lt;/p&gt;

&lt;h1&gt;
  
  
  Limitations
&lt;/h1&gt;

&lt;p&gt;This is first published version for an extension. Currently, only supported version of storage is Storage v1. I will appreciate all feedback :)&lt;/p&gt;

</description>
      <category>devops</category>
      <category>azure</category>
      <category>microservices</category>
    </item>
    <item>
      <title>Tools I should learn as a .net dev</title>
      <dc:creator>Paweł Ruciński</dc:creator>
      <pubDate>Tue, 26 Dec 2017 13:04:40 +0000</pubDate>
      <link>https://dev.to/meanin/tools-i-should-learn-as-a-net-dev-839</link>
      <guid>https://dev.to/meanin/tools-i-should-learn-as-a-net-dev-839</guid>
      <description>&lt;p&gt;Everyone wants to extend their knowledge of favourite technology. I am going to be a full stack dev in the future. Backend frameworks are quite well understood by me already. Things like ASP.NET MVC or .NET Core. Database connection covered by EF6. A little about azure components - app services, web jobs, etc. Now I am learning about js basics and I want to know what should I focus on later?&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>webdev</category>
      <category>dotnet</category>
    </item>
    <item>
      <title>Questions from conducting TDD workshops</title>
      <dc:creator>Paweł Ruciński</dc:creator>
      <pubDate>Tue, 19 Dec 2017 20:45:04 +0000</pubDate>
      <link>https://dev.to/meanin/questions-from-conducting-tdd-workshops-29f6</link>
      <guid>https://dev.to/meanin/questions-from-conducting-tdd-workshops-29f6</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;Recently, I have been trying something new in my career. A few weeks ago, I was chosen for a &lt;a href="https://dev.to/meanin/being-a-scrum-master-3p4"&gt;scrum master role&lt;/a&gt; for two weeks. It was a nice experience, but now I have next challenge. One of my colleague said, that he appreciated my tips about testing. As a consequence, I was asked to conduct a &lt;a href="https://github.com/meanin/test-driven-development"&gt;TDD workshops&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;First of all, I introduced several definitions of test-driven development approach and presented people well known diagrams of its influence on long term projects. I said a few words about &lt;code&gt;red-green-refactor&lt;/code&gt; phases, short development cycles and main test sections. I had prepared project with exercises to consolidate new skills. I presented frameworks for unit testing, FIRST principles, conventions for method names, test doubles and assertions.&lt;/p&gt;

&lt;h1&gt;
  
  
  The right part
&lt;/h1&gt;

&lt;p&gt;Let's cut to the chase. &lt;br&gt;
While teaching guys about testing, I've heard some interesting questions. Here are few of them.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. How much time does each tdd phase take?
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;It depends on how complicated class you are testing. We should aim on making the cycles as short as possible. The shorter cycle we use, the less mistakes we make. It also leads to nice and short tests, which are easy to read.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  2. How big arguments range should be tested? In example, should we test the whole integer? From -2,147,483,648 to 2,147,483,647?
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;From my experience, the best approach is to test all the edge cases. It is also good to test some dumb values. Nulls are worth to test as well.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  3. What is the most reasonable value of the tests coverage?
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;Uncle Bob would say - 100%. From my perspective, you can test business logic only, services and stuff like that. If you have a light weight controller, there is not much to test. When you are testing database connection it is in fact an integration test. I would say - 70%. But it depends.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  4. Which part of the system should be tested?
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;Most of them. The more test you will have, the firmer your system will be. Not every test will be considered as a unit, but in this case, the more the better.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  5. What about asynchronous methods, should I test them? How to do that? What about the speed?
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;Yes. Most of the testing frameworks contain also asynchronous versions. There is no difficulty to make such a call. When you properly extract abstraction and inject mocked dependencies, there is no worries about the speed.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  6. Is there a point to use frameworks like &lt;a href="https://github.com/AutoFixture/AutoFixture"&gt;AutoFixture&lt;/a&gt;?
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;If you are worried about the obscure test outputs, then you shouldn't use it. As I said earlier, the more test cases you test the more confident you can be about your code. If such a framework would generate unpredictable method input, there is a possibility, to discover the new path in that method. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  7. What is the reason for using the spy test double?
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;When you implement a method which runs some dependency several times, the spy will help you. I had a problem with counting how many times a video was played. I extracted abstraction for date and ran several time the same method. Each time my mocked date dependencies had returned different value, so I created a fake process. I simulated the passage of time. With this approach it was really easy to count how many times my video was played.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  8. Where is the fine line between the unit and the integration tests?
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;When you are injecting any real dependencies instead of mocked one during object creation, then it is an integration test.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  9. Are there any alternatives for TDD?
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;In .net world, there is a framework called &lt;a href="http://specflow.org/"&gt;SpecFlow&lt;/a&gt;. It is used to build the application with Behavior-Driven Development (BDD) approach. In this case you are going to create a whole description of the application behavior before starting the real coding. It is an implementation of &lt;a href="https://github.com/cucumber/cucumber"&gt;cucumber&lt;/a&gt;. Other alternative is to blindly trust your own source code and to wait for Quality Assurance team output. But this is very costly.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  10. Does the TDD have any weak point at all?
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;Yup, unfortunately. You have to pay high entry cost. Before you start writing your test efficiently, you need to spend many hours writing bad tests, getting familiar with frameworks, etc. Also, a kind of disadvantage is that unit test has to be maintanted.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Last thoughts
&lt;/h1&gt;

&lt;p&gt;Leading such a training is a nice experience. I am happy, that guys asked me to do it. I faced my fears and I won. I was prepared, topic was well known to me, so basically what to be afraid of? It is easy to be wise after the event, I know. If you ever have such an opportinity, do not hestitate and try yourself.&lt;/p&gt;

&lt;p&gt;P.S.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Are your answers same as mine? &lt;/li&gt;
&lt;li&gt;Have you heard any other interesting questions about using TDD? &lt;/li&gt;
&lt;li&gt;What are your experiences with it?&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>tdd</category>
      <category>teaching</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Forbidden Http headers</title>
      <dc:creator>Paweł Ruciński</dc:creator>
      <pubDate>Mon, 11 Dec 2017 15:52:11 +0000</pubDate>
      <link>https://dev.to/meanin/forbidden-http-headers-e8g</link>
      <guid>https://dev.to/meanin/forbidden-http-headers-e8g</guid>
      <description>&lt;h1&gt;
  
  
  Documenting API with &lt;a href="https://swagger.io/" rel="noopener noreferrer"&gt;Swagger&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;You all know swagger, right? It serves to document your API and provide first front end for testing your calls. As a .net developer I am using &lt;a href="https://github.com/domaindrivendev/Swashbuckle/wiki" rel="noopener noreferrer"&gt;swashbuckle&lt;/a&gt; to generate &lt;a href="https://github.com/swagger-api/swagger-ui" rel="noopener noreferrer"&gt;swagger-ui&lt;/a&gt;. It's rather simple to configure and it provides necessary functionality. By 'necessary', this time I mean to give a user opportunity to insert parameters needed to make a proper call. Headers, path or body params. Last two are the simplest in that case. Basically, the only thing you need to do to make it work, is to create the self-explanatory xml comments connected with your API classes and/or methods. Nice, right?&lt;/p&gt;

&lt;p&gt;Http headers, as they say, is where the hard part begins. Creating a field for http header parameter, in case of the .net swashbuckle, you have to implement IOperationFilter (in the simplest solution, there are more ways to achieve that). Again, it is not so difficult, it has only one method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Operation&lt;/span&gt; &lt;span class="n"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;OperationFilterContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parameters&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parameters&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;IParameter&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;All&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="p"&gt;!=&lt;/span&gt; &lt;span class="s"&gt;"MyCustomHeader"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Parameter&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"MyCustomHeader"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;@in&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"header"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;description&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"MyCustomHeader header"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;required&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;type&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"string"&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The real difficulty starts when you are trying to apply one of the forbidden headers. Do you know them? I wasn't aware of the fact, that some headers are forbidden. But what does it mean &lt;code&gt;forbidden&lt;/code&gt;?&lt;/p&gt;

&lt;h1&gt;
  
  
  My case
&lt;/h1&gt;

&lt;p&gt;I was trying to validate API calls with &lt;code&gt;Proxy-Authorization&lt;/code&gt; header. So, I made it in standard way - created a new operation filter. When it came to testing it, I ran application, navigated to swagger ui, filled up the fields and tested a call. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa5uksgvtv82o6h8o8a4p.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa5uksgvtv82o6h8o8a4p.jpg" width="800" height="478"&gt;&lt;/a&gt;&lt;br&gt;
Curl was generated properly, all the headers included, but it was not propagated in a call. Everything was described &lt;a href="https://dev.to/meanin/adding-proxy-authorization-header-in-swagger-4o2"&gt;here&lt;/a&gt;. Also, I rised this question on &lt;a href="https://stackoverflow.com/questions/47509258/add-proxy-authorization-header-in-swagger" rel="noopener noreferrer"&gt;stackoverflow&lt;/a&gt;. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flsadzxg95s5l4xug2zvd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flsadzxg95s5l4xug2zvd.jpg" width="800" height="371"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fortunately, one of the swashbuckle contributors (thanks if you are reading), got involved and helped me. He asked me to create a &lt;a href="https://github.com/meanin/swashbuckle-proxy-authorization-header" rel="noopener noreferrer"&gt;demo project&lt;/a&gt;, which showed the whole issue in a very simple way. After creation completed, I've posted an answer on stack, and waited for reply. It went quickly, here &lt;a href="https://github.com/swagger-api/swagger-ui" rel="noopener noreferrer"&gt;swagger-api/swagger-ui&lt;/a&gt; the &lt;a href="https://github.com/swagger-api/swagger-ui/issues/3956" rel="noopener noreferrer"&gt;issue&lt;/a&gt; was created. There you can find a short explanation why there is no possibility to make a call from a browser with &lt;code&gt;proxy-authorization&lt;/code&gt; header set. Basically, there are some &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name" rel="noopener noreferrer"&gt;headers&lt;/a&gt; that are impossible to create on a user-agent side. In that case user-agent is a browser. I wasn't aware of that. My aim for the nearest future is to learn more about http flow stuff. Please look at the list of forbidden headers below:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Proxy-&lt;/li&gt;
&lt;li&gt;Sec-&lt;/li&gt;
&lt;li&gt;Accept-Charset&lt;/li&gt;
&lt;li&gt;Accept-Encoding&lt;/li&gt;
&lt;li&gt;Access-Control-Request-Headers&lt;/li&gt;
&lt;li&gt;Access-Control-Request-Method&lt;/li&gt;
&lt;li&gt;Connection&lt;/li&gt;
&lt;li&gt;Content-Length&lt;/li&gt;
&lt;li&gt;Cookie&lt;/li&gt;
&lt;li&gt;Cookie2&lt;/li&gt;
&lt;li&gt;Date&lt;/li&gt;
&lt;li&gt;DNT&lt;/li&gt;
&lt;li&gt;Expect&lt;/li&gt;
&lt;li&gt;Host&lt;/li&gt;
&lt;li&gt;Keep-Alive&lt;/li&gt;
&lt;li&gt;Origin&lt;/li&gt;
&lt;li&gt;Proxy-&lt;/li&gt;
&lt;li&gt;Sec-&lt;/li&gt;
&lt;li&gt;Referer&lt;/li&gt;
&lt;li&gt;TE&lt;/li&gt;
&lt;li&gt;Trailer&lt;/li&gt;
&lt;li&gt;Transfer-Encoding&lt;/li&gt;
&lt;li&gt;Upgrade&lt;/li&gt;
&lt;li&gt;Via&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  Workaround
&lt;/h1&gt;

&lt;p&gt;We had a need to test an API method from swagger. We have been thinking about that for some time. After a few days, one of my colleagues, came up with the idea. Sure, there is no possibility to set &lt;code&gt;forbidden&lt;/code&gt; header from the user-agent, but no one forbid us to set a custom one and rewrite it to proper one on a back-end side.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;override&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;OnAuthorization&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;HttpActionContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;proxyAuthorizationHeader&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Headers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SingleOrDefault&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;h&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Key&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="s"&gt;"ProxyAuthorization"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Headers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ProxyAuthorization&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt; 
        &lt;span class="p"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;proxyAuthorizationHeader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Value&lt;/span&gt; &lt;span class="p"&gt;!=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Headers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Proxy-Authorization"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
            &lt;span class="n"&gt;proxyAuthorizationHeader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;base&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;OnAuthorization&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Of course, this is not a permanent solution, but it works in the development environment. We can configure our app to support this behavior, it is 5 min or less. Couple of attributes to write, &lt;code&gt;#if DEBUG&lt;/code&gt; compiler directive to set and everything works fine. We can test it, even with swagger.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6a1zvhk5s1gyn8pdkgmb.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6a1zvhk5s1gyn8pdkgmb.jpg" width="800" height="805"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;What do you think about it? Did you know about these &lt;code&gt;forbidden headers&lt;/code&gt; earlier? What other pitfalls can I encounter on swagger?&lt;/p&gt;

</description>
      <category>http</category>
      <category>swagger</category>
      <category>swashbuckle</category>
    </item>
    <item>
      <title>Being a scrum master</title>
      <dc:creator>Paweł Ruciński</dc:creator>
      <pubDate>Mon, 04 Dec 2017 14:13:20 +0000</pubDate>
      <link>https://dev.to/meanin/being-a-scrum-master-3p4</link>
      <guid>https://dev.to/meanin/being-a-scrum-master-3p4</guid>
      <description>&lt;p&gt;I work in an international team where we are using Agile scrum methodology for project delivery. Scrum is about being ready to deliver new fully functional version of an application or system in one time period called sprint. One sprint consists of two weeks. It contains some fixed points during every day. One of them is daily stand up. This routine needs a person which will lead the whole ceremony.&lt;/p&gt;

&lt;p&gt;Recently I was chosen to be a scrum master for one sprint. I decided to write a sentence or two after every daily stand up. Here you have the results.&lt;/p&gt;

&lt;h1&gt;
  
  
  Positives
&lt;/h1&gt;

&lt;p&gt;First difficulty was to speak in English for an hour, day by day on daily stand ups. My native language is Polish, and I am not comfortable with speaking English as much as I want to, so it was a little bit challenging for me. Next day I had a feeling that daily stand up would go on forever. I was a little scared that something would go wrong. Every time I took the floor, I felt that I was making so many mistakes... Ugh, that was a though one. After all, it turned out that our client wanted to share with us project mile stones for the next quarter.&lt;/p&gt;

&lt;p&gt;Continuous contact with client is difficult. Every time you should to (or even must) have an answer for every question. There is a real need for agile board to be up-to-date. Project Managers work on this on their daily basis. Solution for this is to sacrifice a few minutes before each daily stand up and a few more before leaving the office to sum up the teams' work. I've learned that preparing everything before stand ups pays off. I am less stressed, I know what I want to say, etc. &lt;/p&gt;

&lt;p&gt;If somebody has to say something, give her/him to speak. It is good if you give people a chance to express themselves. Keep also in mind to be careful about the length of everyone's speech, because daily's sometimes tend to go on and on. Also, be confident of what you do, what you say. Your co-workers need to be focused on daily meeting content. It will also help you to keep up the pace of your stand ups. When you do not have much to say, stay with the facts only, there is no need to extend your statement. Treat this duty as something normal. It is normal. So many people are driving daily stand ups, why should you worry about what others are thinking of you?&lt;/p&gt;

&lt;h1&gt;
  
  
  Difficulties
&lt;/h1&gt;

&lt;p&gt;Prevent showing private things during stand ups. Probably you are wondering why I mention it, how is it even possible? In our project we work in international team with people from several countries. For daily stand ups we have a video-conference with shared desktop, to everyone see the JIRA board. We discuss each ticket together and classify it to proper column - depending on whether it's already finished, just started, etc. On the other day I had a setback with facebook. I connected conference, prepared shared desktop and there were still a few minutes left and being aware of that I had two monitors, I decided to check out how my wife was going at home. Unfortunately, when everyone joined the meeting and we finally started, I had to show something on my browser. I opened it with a facebook page on unintentionally, but still, everyone saw it. Luckily, my project manager quickly turned it into a joke. That was a relief, but I will remember that for a long time.&lt;/p&gt;

&lt;p&gt;After a few days as a Scrum Master, I got used to this. It is no longer a pain to lead daily's. I am preparing everything 5-10 minutes before it starts, and I try to sum up everyone works on our general slack channel before I leave the office. The worst thing is, that even when you have a bad day (for example one day I had a terrible neck ache), you have to be prepared anyway, full of optimistic thoughts and lead a daily as always, trying to affect others with your good attitude. Moreover, an estimation sessions use to be longer than initially expected, so on that day was a paaaaaaaain. So, it is up to you to keep the pace of the meeting. &lt;/p&gt;

&lt;p&gt;The end of sprint meeting was a pain in the ass too... In my case it lasted forever. We had a normal daily stand up, which took about half an hour. I was already tired after normal meeting, because when others were speaking, I was preparing sessions for sprint review and estimation meantime (Yes, I know, I should be prepared before). Unfortunately, that was the longest review ever. People had more and more ideas how to make our team better. I had to read all the reported tickets during session, ask my colleagues one by one for more input, try to suggest the action points for what went wrong during sprint etc. It took so much time again, that for me it felt like the whole eternity.. But to be honest, it was about an hour. Finally, we came to the estimation session. Only 10 tasks to estimate. We could skip a few, as they were misplaced, it was not in our scope to resolve them. At long last we finished with ~5 task to estimate, but those were the big ones. We were arguing about how much story points we should assign them. But luckily, it happens once for a sprint.&lt;/p&gt;

&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;To sum up, from time to time, a few innocent jokes will significantly improve daily stand ups atmosphere. It is not so hard to lead daily stand ups. Just give it a try, be prepared and don't be shy. It is another opportunity to strengthen your language skills. Remember about tools which you can use (in example: &lt;a href="https://www.planitpoker.com/"&gt;poker planning tool&lt;/a&gt;, &lt;a href="http://www.ideaboardz.com/"&gt;retro session tool&lt;/a&gt;), and as Thomas Fuller said: &lt;code&gt;"All things are difficult before they are easy"&lt;/code&gt;.&lt;/p&gt;

</description>
      <category>scrum</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Accelerate your test creation</title>
      <dc:creator>Paweł Ruciński</dc:creator>
      <pubDate>Wed, 29 Nov 2017 15:04:55 +0000</pubDate>
      <link>https://dev.to/meanin/accelerate-your-test-creation-1a1</link>
      <guid>https://dev.to/meanin/accelerate-your-test-creation-1a1</guid>
      <description>&lt;p&gt;I want to code efficiently. I am always trying to use TDD approach. For some time I have been wondering, what takes up most of my time during development process. I want to improve my daily routine, to care more about coding itself and less about configuring solutions, projects, classes etc.&lt;/p&gt;

&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;I am aware of power of scaffolding, but really, how often do you launch brand new solution? When creating, lets say  web solution, you have to decide if it should be only an API or/and a front-end solution, right? &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--o-2fa0zg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/mwk7e205ym41ho8h3oie.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--o-2fa0zg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/mwk7e205ym41ho8h3oie.jpg" alt="Creating new MVC project"&gt;&lt;/a&gt;&lt;br&gt;
After some time, there is a nice setup solution. With created HomeController, related Views etc. You have something to work with instead of writing everything from a scratch. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_lc8vSZn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/t1hv55w15gdlodfke94f.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_lc8vSZn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/t1hv55w15gdlodfke94f.jpg" alt="Created solution"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But it happens once for a solution lifetime. From the other hand, how often does it occur that you need to write new lib? If you are practicing TDD, there is also an associated test project.&lt;/p&gt;

&lt;p&gt;So I was wondering, is there any way to take this functionality and apply it on creation of test project? Because each time I create a class library, I also create a test project. I am using XUnit on my daily basis, so I focused on using it in my little invention.&lt;/p&gt;
&lt;h1&gt;
  
  
  First attempt
&lt;/h1&gt;

&lt;p&gt;I did some research to know if there is any option. Scaffolding is a well known functionality, introduced in Visual Studio 2013. It is not so difficult to create custom scaffolded items. There is a way to extract it from existing projects, files, code. Following this way, I created my first templates for Visual Studio. I took vs15 and vs17. You can find my work &lt;a href="https://github.com/meanin/xunit-scaffolding"&gt;here&lt;/a&gt;. It is nothing advanced, but it fulfills my basic requirements. Trying to be professional, I have made an icon and an installer for this. It creates a project with XUnit nuget preinstalled or a new class with imposed test method layout.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IjMkgejR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/9dsq6urq6lll0dudu0ty.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IjMkgejR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/9dsq6urq6lll0dudu0ty.jpg" alt="Scaffolding for XUnit"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It results in a test layout like this below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Xunit&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;namespace&lt;/span&gt; &lt;span class="nn"&gt;Xunit_Test_Project1&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Tests&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Fact&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Method_When_Should&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;// arrange&lt;/span&gt;

            &lt;span class="c1"&gt;// act&lt;/span&gt;

            &lt;span class="c1"&gt;// assert&lt;/span&gt;

        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I also created a code snippet for creating test methods - works same as above after typing &lt;code&gt;testmethod&lt;/code&gt;. There is also a possibility to do that with R# mechanisms.&lt;/p&gt;

&lt;h1&gt;
  
  
  Feedback
&lt;/h1&gt;

&lt;p&gt;Next morning, full of the joys of spring, I went to the office and wanted to share my little side project with co-workers. First person I had shared the news with, brought me down to earth. There is already created solution, which provides everything what I need. &lt;/p&gt;

&lt;p&gt;My colleague showed me &lt;a href="https://marketplace.visualstudio.com/items?itemName=NUnitDevelopers.TestGeneratorNUnitextension"&gt;NUnit.TestGenerator&lt;/a&gt;. Did you know that? He was working with in in his previous company. After playing with it for some time, I agreed that it was very useful and this was what I really needed. My nature didn't give up and was trying to pick holes in this Nunit.TestGenerator. Why? Because it is using NUnit instead of my favorite XUnit. So I started to dig for any equivalent using Xunit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--W508hIfw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/hlev5zoiamht0h3t40lf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--W508hIfw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/hlev5zoiamht0h3t40lf.jpg" alt="Test generator for xunit"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Unfortunately, none of these is available on &lt;code&gt;Extension and Updates&lt;/code&gt; context menu.&lt;/p&gt;

&lt;h1&gt;
  
  
  Second attempt
&lt;/h1&gt;

&lt;p&gt;Bearing this in mind for a few days I have been searching for similar solution. I found &lt;a href="https://marketplace.visualstudio.com/items?itemName=YowkoTsai.xUnitnetTestGenerator"&gt;XUnit.TestGenerator&lt;/a&gt; online, author - YowkoTsai. It is not available through VS, but you can download an installer.&lt;/p&gt;

&lt;p&gt;It works like this - after right-click a method name, shows up a menu, where is a section for test purpose. Without this add-on, there are only &lt;code&gt;Run tests&lt;/code&gt; and &lt;code&gt;Debug tests&lt;/code&gt; options. When you install it, you can also find &lt;code&gt;Create unit tests&lt;/code&gt; options.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AL6c6MUm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/v1jj151lo5gf03qmsxrc.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AL6c6MUm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/v1jj151lo5gf03qmsxrc.jpg" alt="Create tests"&gt;&lt;/a&gt;&lt;br&gt;
It opens a new dialog window, where you can configure your whole new project and/or classes by clicking on it.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--owtdg1VY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/lmewc3lw0ekq4t1fd51q.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--owtdg1VY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/lmewc3lw0ekq4t1fd51q.jpg" alt="Create test context"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Do you think that the journey already ends? Noooooo.&lt;/p&gt;

&lt;p&gt;I found it also on github. Forked it. I didn't touch it during first week, but after that, I sat down and tried to enforce a few of my rules for testing.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Test project naming convention: &lt;code&gt;.Test&lt;/code&gt; and &lt;code&gt;.IntegrationTests&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Test method naming convention: &lt;code&gt;Method_When_Should&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Test method layout (as above)&lt;/li&gt;
&lt;li&gt;XUnit of course!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I started with the easiest one, test layout. This was a simple change on one field. Build, install and it works. At least &lt;a href="https://github.com/meanin/xUnit.net.TestGenerator"&gt;something&lt;/a&gt; I was able to customize to. I realized that other points were not possible, because of the lack of the documentation, because only a few repository exists on github, etc. Even if I wanted to do that in a proper way, it would take so much time with testing, building and so on. Now I am wondering if Microsoft will eventually give us an opportunity to fully customize tools like this. After all I end up with something like this (slow loading):&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wSIlMBDM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/381pbt525eiavg7an8k1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wSIlMBDM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/381pbt525eiavg7an8k1.gif" alt="gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;I will use my custom test generator. Also, I want to try to convince my co-workers to use it as well. I like to use shared standards in daily work. Is it useful? Will I benefit from it?&lt;/p&gt;

&lt;p&gt;I hope that time will show.&lt;/p&gt;




&lt;p&gt;What are your feelings about this scaffolding in general? Do you have favorite tools for creating tests? Can you help me to push further this customization?&lt;/p&gt;

&lt;p&gt;Please, share with me your experience.&lt;/p&gt;

</description>
      <category>tdd</category>
      <category>scaffolding</category>
      <category>efficiency</category>
      <category>visualstudio</category>
    </item>
    <item>
      <title>Adding Proxy-Authorization header in swagger</title>
      <dc:creator>Paweł Ruciński</dc:creator>
      <pubDate>Mon, 27 Nov 2017 11:55:29 +0000</pubDate>
      <link>https://dev.to/meanin/adding-proxy-authorization-header-in-swagger-4o2</link>
      <guid>https://dev.to/meanin/adding-proxy-authorization-header-in-swagger-4o2</guid>
      <description>&lt;p&gt;Hi all,&lt;br&gt;
I already posted this question on &lt;a href="https://stackoverflow.com/questions/47509258/add-proxy-authorization-header-in-swagger"&gt;stack overflow&lt;/a&gt;, but I think, that here I can find interested people faster.&lt;/p&gt;

&lt;p&gt;I need to add specific header on swagger ui using .net core. Is there any way to include header like this?&lt;/p&gt;

&lt;p&gt;Already tried:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;implementing IOperationFilter:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Operation&lt;/span&gt; &lt;span class="n"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;OperationFilterContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Parameters&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Parameters&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;IParameter&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Parameters&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;All&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Name&lt;/span&gt; &lt;span class="p"&gt;!=&lt;/span&gt; &lt;span class="s"&gt;"Proxy-Authorization"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Parameters&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;NonBodyParameter&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;Name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Proxy-Authorization"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;In&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"header"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;Description&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Proxy-Authorization token"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;Required&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;Type&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"string"&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;adding security definition:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddSecurityDefinition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Authorization"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;ApiKeyScheme&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;In&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"header"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Description&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Please insert Proxy Authorization Secret into field"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Proxy-Authorization"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Type&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"apiKey"&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both didn't work. When I change header name everything works fine (&lt;code&gt;HttpContext.Request.Headers&lt;/code&gt; contains desirable header), but this specific ( &lt;code&gt;Proxy-Authorization&lt;/code&gt;) header is wiped out from a call.&lt;/p&gt;

&lt;p&gt;Did you ever meet this issue? How to solve it?&lt;/p&gt;

&lt;p&gt;EDIT:&lt;/p&gt;

&lt;p&gt;I confirmed that this is not the issue in .net core only. Full .net framework has also this bug.&lt;/p&gt;

&lt;p&gt;Furthermore it is only affected on header with &lt;code&gt;proxy-&lt;/code&gt; prefix.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>swagger</category>
      <category>swashbuckle</category>
    </item>
  </channel>
</rss>
