Building the Right Thing in .NET with TestStack

Build what your customer actually wants and produce business-readable, living documentation from tests.
Course info
Rating
(81)
Level
Intermediate
Updated
May 1, 2014
Duration
4h 15m
Table of contents
Introducing TestStack
Living, Executable, Business-Readable Documentation with BDDfy
BDDfy - Beyond the Fundamentals
Automating WPF Applications with White
Automating Web Applications with Seleno
Using BDDfy with White and Seleno
Validating Coding Conventions and Testing MVC Controllers
Description
Course info
Rating
(81)
Level
Intermediate
Updated
May 1, 2014
Duration
4h 15m
Description

Learn how to use the TestStack tools to ensure the right features are being built. Increase the clarity of communication within the development team and between the team and customer. Produce living documentation by executing the specifications of the system and help to find defects sooner. Automate Web sites and WPF application UIs.

About the author
About the author

With over 15 years experience, Jason Roberts is a Microsoft .NET MVP, freelance developer, and author.

More from the author
Introduction to .NET Testing with NUnit 3
Intermediate
2h 6m
Dec 17, 2018
Working with Files and Streams in C#
Intermediate
3h 13m
Oct 12, 2018
Error Handling in C# with Exceptions
Intermediate
1h 37m
Aug 6, 2018
More courses by Jason Roberts
Section Introduction Transcripts
Section Introduction Transcripts

Introducing TestStack
Hi. Welcome to this course on Building the Right Thing in. NET with TestStack. I'm Jason Roberts from Pluralsight. Regardless of how good our engineering practices are, if we build the wrong thing for our customers, then we've wasted time, money, and effort, and we've potentially damaged our relationship with our customers. The TestStack Suite of Tools help us to build the right thing so this doesn't happen. In this first module, we'll take a look at one of the culprits that result in us building the wrong thing sometimes, and this can be referred to as the Software Development Communication Gap. We'll look at what it means to have living documentation, as opposed to dead documentation, and how we can keep our documentation that specifies what the system should do in sync with what the system is actually doing. We'll see the areas that the TestStack Suite of Tools focus on, and some aspects of testing where TestStack isn't really involved. We'll get a brief overview of the individual tools that make up the TestStack Suite. And finally, we'll discuss automated user interface testing, where it fits in the grand scheme of testing, and what are some of the considerations we should bear in mind when performing automated UI testing.

Living, Executable, Business-Readable Documentation with BDDfy
Hi. Welcome back. In this module, we're going to look at the first of the TestStack Tools called BDDfy, and we'll see how BDDfy can help us create living, executable, and business-readable documentation. In this module, we'll start off by seeing how BDDfy can help us fill the communication gap that we talked about in the last module, and how it can also help us create living documentation from our tests. We'll see how we can apply BDDfy to existing tests, and the naming conventions we should use when we're naming our test methods. We'll see that BDDfy produces this business readable HTML report, which lists all of our scenarios for our tests. We'll learn what happens when we have errors in the different phases of our tests, and also a possible usage scenario for BDDfy in test-first development approaches. We'll learn how we can take individual test scenarios, and group them into related stories, so we can describe a related set of functionality. We'll learn how we can use ExecutableAttributes to override the default naming conventions that BDDfy uses when searching for test methods. Finally, we'll see how we can define a test scenario, but then execute it with multiple input test data.

BDDfy - Beyond the Fundamentals
Hi. Welcome to the second module on BDDfy where we'll be going beyond the fundamentals that we learned about in the previous module. In this module, we'll see how we can describe our scenarios using a fluent API, as opposed to the reflective style that we saw in the previous module. We'll see how we can refactor to this fluent style from the reflective style. We'll learn how we use test data in this fluent style, and how we can have more control over the outputs in our scenario text. We'll learn about the additional reports that BDDfy comes with, such as the diagnostic reports, and the markdown reports. And we'll see how we can generate our reports without actually running any of the tests, so they can produce a complete set of documentation without having to wait for our tests to execute. We'll learn about custom HTML report configuration, and also how we can apply our own CSS to restyle the report.

Automating WPF Applications with White
Hi. Welcome back to this module on how we can automate Windows Presentation Foundation Applications using the White tool that's part of the TestStack Suites. In this module, we're going to get an introduction and an overview of White, and also look at what a potential simple test flow would look like when using White in our tests. We'll learn about the concepts of applications, windows that belong to these applications, and user interface items that make up our windows. We'll see how we can use White to interact with various user interface controls that we have in our windows. So this could be automating the clicking of a button, or the entering of some text into a text box. We'll also learn how we can manage modal windows in our application, and also how we can deal with MessageBoxes, and choosing options within those MessageBoxes. We'll then consider maintainability of our White tests, and how the Page Object Pattern can help us organize our tests better. We'll then see how White screen objects help us implement this Page Object Pattern, and also how we can use White screen repositories to create and initialize our screen objects for us.

Automating Web Applications with Seleno
Hi. Welcome to this module on Automating Web Applications with Seleno. So, we saw in the previous module on White how we can use it to automate WPF applications. With Seleno, we can perform similar automation, but this time in our web applications, whether they be remote applications, or applications that we've developed ourselves, such as an ASP. NET MVC application. In this module, we'll start off by getting a brief overview of Seleno and how it fits in with our test code. We'll look at a simple test that automates a web page that doesn't use any kind of page model approach. We'll learn how to locate HTML items on a page, and also how we can read text from them. Next, we'll look at how the Page Object Model Pattern is implemented in Seleno, and there're two approaches here that we'll look at. One is the weakly typed page object, and the other is the strongly typed page object where we can reuse our models that we've defined in our ASP. NET MVC project. We'll learn how we can locate HTML elements when we're using jQuery, and also how we can configure Seleno to use Chrome instead of the default Firefox. Finally, we'll learn how we can configure Seleno to test remote websites, and also how we can use it to take screenshots of the sites that we're testing.

Using BDDfy with White and Seleno
Hi. Welcome back. So far in this course we've learned how to use BDDfy to create business readable living documentation, how we can use White to automate WPF applications, and how we can use Seleno to automate our web browser. In this module, we'll see how we can combine BDDfy with both White and Seleno to create a living documentation that represents the end users interaction with our systems. So first off, we'll see how BDDfy fits in when we're using it to test the user interface of our applications. We'll see how we can integrate BDDfy with White, and WPF application testing. And how we can also integrate BDDfy with Seleno to automate web applications. Finally, we'll look at an example where we can combine both BDDfy, White, and Seleno in the same testing solution to create cross application UI workflow tests.

Validating Coding Conventions and Testing MVC Controllers
Hi. Welcome to this final module on TestStack. In this module, we're going to look at a couple of other tools that fall under the TestStack umbrella. The tools we're going to cover in this module allow us to validate any coding conventions that we might be using, and also provide a fluent way of testing MVC controllers. So, in this module, we're going to start off by looking at a tool called FluentMVCTesting. We'll get an overview of FluentMVCTesting that helps us to test our MVC controllers. We'll see how we can test the results of controller actions, how we can test that the correct redirections are taking place, and how we can do some tests against the models themselves. The second tool we're going to be looking at in this module is convention tests. This allows us to validate any convention based coding we're doing in our application. And there's a number of prepackaged conventions we can take advantage of, and we can also define our own conventions.