bUnit is a testing library for Blazor Components. Its goal is to make it easy to write comprehensive, stable unit tests
Category: Testing
UITest with C# and Selenium Grid
Sometimes we don’t know from how to start testing our UI. Here I explain how to write UI Test with C#, Selenium and Selenium Grid from scratch
Test our code with json
Test Driven Development (TDD) helps you to validate your code but something you need to check some result from a json file. Here my solution
Given, When, Then
Given-When-Then is a style of representing tests specifying a system’s behavior. It’s an approach developed by Dan North and Chris Matts as part of Behavior-Driven Development (BDD). It appears as a structuring approach for many testing frameworks such as Cucumber. You can also look at it as a reformulation of the Four-Phase Test pattern. The essential idea is to break down writing a scenario (or test) into three sections: The given part describes the state of the world before you begin the behavior you’re specifying in this scenario. You can…
7 Popular Unit Test Naming Conventions
Following are 7 popular unit tests naming conventions that are found to be used by majority of developers and compiled from above pages: MethodName_StateUnderTest_ExpectedBehavior: There are arguments against this strategy that if method names change as part of code refactoring than test name like this should also change or it becomes difficult to comprehend at a later stage. Following are some of the example: isAdult_AgeLessThan18_False withdrawMoney_InvalidAccount_ExceptionThrown admitStudent_MissingMandatoryFields_FailToAdmit MethodName_ExpectedBehavior_StateUnderTest: Slightly tweeked from above, but a section of developers also recommend using this naming technique. This technique also has disadvantage that if…