Beginners Guide to Unit Testing with NUnit and C#

Write simple unit tests in C# using the NUnit framework

Requirements

  • Basic Skills in C#

Description

This course is all about writing unit tests using C# programming language and NUnit as a unit testing framework. Today unit testing is an absolutely required skill from any professional developer. Companies expect from developers to know how to write unit tests.

Learning unit testing puts a powerful and very useful tool at your fingertips. Being familiar with unit testing you can write reliable and maintainable applications. It is very hard to lead a project which is not covered by unit tests.

Content and Overview

This course is primarily aimed at beginner developers.

We start with basics of unit testing. What is a unit test? What unit testing frameworks exist? How to run and debug unit tests. After getting acquainted with the basics, we will get to the NUnit framework. Here you’ll learn how to install the framework, set the runner. Then you’ll learn the basics of assertions and arrange-act-assert triplet. Other key features of NUnit are also covered:

  • Running tests from the console
  • Setup and teardown unit tests
  • Parameterized tests
  • Grouping and ignoring

Who this course is for:

  • Anyone who wants to learn the basic of unit testing

Course content

2 sections • 34 lectures • 1h 52m total lengthExpand all sections

Getting Started16 lectures • 47min

  • About the Course00:27
  • Download Source Code and Slides00:04
  • Join .NET Community of Students00:02
  • BONUS00:35
  • Outline00:58
  • What is a Unit Test?03:11
  • Unit-Testing Frameworks03:25
  • First Unit Test08:49
  • Naming Conventions04:34
  • Running and Debugging Tests in Visual Studio05:02
  • Benefits of Unit Testing03:35
  • Who should write unit tests and When?02:51
  • Programmer’s Oath03:29
  • Exercise: Degree Converter01:29
  • Solution: Degree Converter06:54
  • Conclusion01:15

NUnit Framework18 lectures • 1hr 6min

  • Outline01:06
  • Assert. Introduction05:29
  • Assert. Demo10:27
  • Arrange-Act-Assert (AAA)01:01
  • Running a Test from the Console01:51
  • SetUp and TearDown05:09
  • SetUp and TearDown on Higher Levels02:13
  • Parameterized Tests03:40
  • Grouping and Ignoring02:14
  • Code Coverage01:42
  • Exercise: FizzBuzz01:07
  • Solution: FizzBuzz05:05
  • Exercise: Roman Numerals02:27
  • Solution: Roman Numerals09:27
  • Exercise: Stack00:59
  • Solution: Stack09:02
  • Conclusion01:24
  • BONUS-Video01:18

Selenium with C# and Java Titbits

Start understanding Selenium Webdriver basics very clearly

Work with various features available with Selenium

Explore the most frequently asked questions in Selenium Webdriver

Requirements

  • Basic understanding of C# and Java is more than enough to understand the course

Description

Selenium Titbits video series is for those who want to get hold of basic understanding of Selenium in greater detail.

This series is designed in such a way that one can easily understand under the hood of Selenium along with some of the nitty-gritty detail one must know while doing bigger projects in Selenium (say framework development)

Who this course is for:

  • This course is for everybody who wants to learn Selenium from groundup
  • This course will help leverage one to get hold of some of the routine task done in selenium day in and day out

Course content

3 sections • 20 lectures • 3h 22m total lengthExpand all sections

Introduction1 lecture • 1min

  • Introduction00:56

Selenium Titbits (Java)15 lectures • 2hr 22min

  • Working with different browsers with Selenium (Java)09:26
  • Finding and working with controls with Selenium (Java)06:18
  • Explicit and Implicit wait with Selenium (Java)11:13
  • Taking Screenshot with Selenium (Java)08:10
  • Check control exist with Selenium (Java)06:25
  • Drag and Drop with Selenium (Java)09:53
  • Mouse hover and Click with Selenium (Java)11:37
  • Working with popup window with Selenium (Java)06:26
  • Understanding and working with Xpath (Java)11:08
  • Selenium Grid understanding and configuring (Java)10:24
  • Selenium Grid understanding and configuring (Cont)12:05
  • Selenium grid parallel execution (Java)12:31
  • Selenium grid parallel execution (Cont)10:36
  • Working with Hidden control using Selenium (Java)08:34
  • Selenium 3.0 and Mozilla Gecko Driver (Marionette) for Firefox 47.x and above07:26

Selenium Titbits (C#)4 lectures • 1hr

  • Custom method to work with Simple Table in Selenium (C#)11:44
  • Custom method to work with simple Table in Selenium (Cont)17:39
  • Understanding Javascript for Selenium (C#)18:02
  • Creating own selenium webdriver with IJavascriptExecutor (C#)12:15

Unit Testing en C#

Unit testing automatizado

Requirements

  • Conocimientos de .Net/C#

Description

Este curso está destinado a programadores C# con poca o ninguna experiencia en la automatización de pruebas. Presenta los conceptos básicos de pruebas unitarias. Si bien se utiliza la herramienta NUnit todos los conceptos son perfectamente aplicables a otras herramientas como MSTest y xUnit sin mayores dificultades. Más aún, los conceptos también pueden extrapolarse fácilmente a herramientas de otras tecnologías como JUnit (java), RubyTest(ruby) y SUnit(smalltalk).

El curso consta de dos horas de video, repartidas en varios videos de no más de 10 minutos cada uno. Adicionalmente a los videos el curso provee un conjunto de recursos que incluyen lecturas complementarias y ejercicios de programación con sus respectivas soluciones para que puedas comparar con tu propia solución. El curso también puede ser de gran utilidad para programadores que ya tengan experiencia haciendo pruebas automatizadas ya que además de los conceptos fundacionales de la materia, se ofrecen también varias recomendaciones surgidas de la experiencia de haber trabajado por más de 15 años en la temática.

Si bien puedes hacer el curso al ritmo que gustes, mi recomendación para un aprendizaje efectivo es que planifiques para hacerlo en una  semana, reservando 4 bloques de 1 hora en los cuales alternes videos, lecturas y ejercicios. Es fundamental que hagas los ejercicios, son pocos, pero te ayudarán a afianzar los conceptos.

Who this course is for:

  • Desarrollo de .Net/C#

Course content

3 sections • 15 lectures • 1h 57m total lengthExpand all sections

Fundamentos7 lectures • 51min

  • Fundamentos de unit testing08:06
  • Un primer test sin framework de testing08:05
  • Hacia un framework de testing06:53
  • Primeros pasos con NUnit06:49
  • Posibles resultados de un test09:28
  • NUnit, VSCode & Rider03:08
  • Test Runner & Nunit Test Adapter08:20

Convenciones de NUnit4 lectures • 35min

  • Un ejemplo más real de NUnit10:30
  • Inicialización y finalización de test en NUnit06:57
  • Test de situaciones de excepción07:47
  • Tipos de Asserts09:17

Organización de casos de prueba4 lectures • 33min

  • Generación de Casos de Prueba con NUnit08:28
  • Agrupamiento de test en NUnit07:23
  • Consideraciones de diseño de Casos de Prueba07:11
  • Cierre y Siguientes pasos09:35

Introduction to Unit Testing in C#

Understand how to create and run unit tests for a library in C#

Learn how to apply unit tests to a test driven development process

Gain knowledge on what to test and what NOT to test

Hands-on lab – create unit tests and apply them to a project

Requirements

  • Some programming experience. Understand the basic of creating and assigning variables and using logic comparisons
  • Able to use Visual Studio (Community or Code – free to install and use!).
  • Able to create simple methods in C# – understanding of flow control (if-else, while, for, foreach) and assignment of values to variables.

Description

Through the use of hands-on work, you will learn how to create and work with unit tests in C# using the Visual Studio integrated development environment. Get professional tips on creating, debugging, and improving your tests in a practical way.

The introduction uses a two iteration cycle to create unit tests that address the product code as it is being developed, giving you the basis for not only creating and improving your unit testing ability, but also pointing the way towards exercising these new concepts in BDD (Business/Behavior Driven Development) or TDD (Test Driven Development).

We do more than just talk about how to do this, we provide step-by-step labs detailing how to create your automation and how to improve it as we progress.

For this course, starter code projects are supplied, as well as finished projects you can adapt to fit your needs, or use for reference for further projects.

This course is designed this to help those who want to expand their capabilities in creating software test automation.

Whether you are a student, a manual tester, or are already a software test professional, this course can help you become more effective in your role.

Start your journey towards effective unit testing today!

Who this course is for:

  • Beginning software professionals looking to increase their skillsets
  • Software professionals who want to learn about unit tests and Test Driven Development

Course content

4 sections • 5 lectures • 32m total lengthExpand all sections

Introduction2 lectures • 5min

  • Introduction00:20
  • Setting Up04:55

Unit Testing, Iteration 11 lecture • 10min

  • Unit Testing, Iteration 110:06

Unit Testing, Iteration 21 lecture • 12min

  • Unit Testing, Iteration 212:10

Wrapping up1 lecture • 5min

  • Wrapping Up05:17