We may earn an affiliate commission when you visit our partners.
Mel Grubb

Learn how to create effective and maintainable test contexts that help guide other team members rather than acting as a barrier. Keep your contexts focused on the relevant details through the use of the Object Mother and Object Builder patterns.

Read more

Learn how to create effective and maintainable test contexts that help guide other team members rather than acting as a barrier. Keep your contexts focused on the relevant details through the use of the Object Mother and Object Builder patterns.

In this course, you'll see a demonstration of a typical hand-built test context, and the factors that make it brittle and hard to maintain. By using software principles we're all familiar with, and some patterns we may not have seen before, we can create contexts that remain focused on the information most important to understanding what the tests are trying to tell your team. We'll start with general principles, and then move into the Object Mother pattern, a common approach to extracting test context creation tasks. From there, we'll move into the Object Builder pattern, a more modern and expressive evolution of the Object Mother. Finally, you'll see how to use Roslyn-based C# scripts to generate the tedious parts of the Object Builder pattern, so that you can get back to the interesting stuff. When you’re finished with this course, you will have an appreciation for what makes for a good test context, and the skills to apply this knowledge to your current and future projects.

Enroll now

What's inside

Syllabus

Course Overview
The Problem with Test Suites
Extracting Test Data into an "Object Mother"
Evolving an Object Mother into a Builder
Read more
Automating Builder Creation with Code Generation

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Introduces learners to software principles associated with building test contexts
Explores object mother and object builder patterns that address maintenance and upkeep issues associated with test contexts
Provides learners with hands-on practice implementing the object mother pattern, a well-established approach for organizing test context initialization methods
Introduces the object builder pattern, an improved framework for constructing test contexts
Emphasizes the use of code generation techniques to help learners automate repetitive tasks and simplify the creation of object builders
Implements the Roslyn-based C# scripting framework to expedite the generation of complex test contexts

Save this course

Save Creating Maintainable Contexts for Automated Testing to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Creating Maintainable Contexts for Automated Testing with these activities:
Revisit principles of SOLID
Provide context about the principles of SOLID as they relate to creating effective test contexts.
Show steps
  • Review introductory materials on SOLID principles, such as articles or tutorials.
Read 'Testing Best Practices' by Nat Pryce
Provide context about test contexts and to explore the concepts of an Object Mother and Object Builder.
Show steps
  • Acquire a copy of the book.
  • Read the book to gain an understanding of testing best practices.
Practice identifying brittle and maintainable test contexts
Develop a critical eye for identifying brittle and maintainable test contexts, a skill that is applicable to other areas of software design.
Show steps
  • Review examples of both brittle and maintainable test contexts.
  • Practice identifying which characteristics make a test context brittle or maintainable.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Follow a tutorial on creating test contexts with C# scripts
Gain practical experience by following a guided tutorial on using C# scripts to automate the creation of test contexts.
Show steps
  • Find a tutorial that demonstrates how to use C# scripts to create test contexts.
  • Follow the steps in the tutorial to create a test context.
Attend a coding event or meetup focused on testing
Connect with other software developers and gain insights into their approaches to test context creation.
Show steps
  • Find a coding event or meetup in the local area that focuses on testing.
  • Attend the event and engage with other attendees.
Create a test context using the Object Mother pattern
Apply the Object Mother pattern to a personal project or assignment to gain hands-on experience with the concept.
Show steps
  • Choose a project or assignment that requires the creation of test contexts.
  • Design and implement an Object Mother for the project.
Write a blog post or article about test contexts
Reflect on and reinforce learning by creating written content that explains test contexts and their benefits.
Show steps
  • Choose a specific aspect of test contexts to write about, such as the Object Mother or Object Builder pattern.
  • Write a blog post or article that explains the topic clearly and concisely.

Career center

Learners who complete Creating Maintainable Contexts for Automated Testing will develop knowledge and skills that may be useful to these careers:
Software Tester
A Software Tester is responsible for testing software quality and finding bugs. Software Testers need a comprehensive understanding of coding principles. This course can help build a foundation in the critical concepts and application of software principles.
Developer in Test
Developers in Test write tests to check the functionality and quality of software. This course can help build a foundation in the critical concepts and application of test context creation in software development.
Test Engineer
Test Engineers are in charge of designing and executing tests, writing test plans, identifying and resolving defects, and monitoring test results. This course can help build a foundation in the critical concepts and application of test context creation.
Quality Assurance Analyst
A Quality Assurance Analyst works to guarantee that software applications meet the standards and requirements of their users. This course can help build a foundation in the critical concepts and application of software testing and quality assurance.
Software Architect
Software Architects design, build, and maintain software systems. This course can help build a foundation in the critical concepts and application of software testing and test context creation.
Technical Support Engineer
Technical Support Engineers are responsible for providing guidance to software users and fixing bugs. This course can help build a foundation in the critical concepts and application of software testing.
Quality Assurance Manager
Quality Assurance Managers are in charge of the quality of software applications. This course can help build a foundation in the critical concepts and application of software testing and test context creation.
Software Development Manager
Software Development Managers oversee the development of software applications. This course can help build a foundation in the critical concepts and application of software testing and test context creation.
User Experience Designer
User Experience Designers focus on the user experience of software applications. This course can help build a foundation in the critical concepts and application of software testing and test context creation.
Technical Writer
Technical Writers create documentation for software applications. This course may be of some use in building a foundation in some of the critical concepts and application of software testing.
Data Scientist
Data Scientists use data to build and improve software applications. This course may be of some use in building a foundation in some of the critical concepts and application of testing.
Business Analyst
Business Analysts gather and analyze business requirements. This course may be of some use in building a foundation in some of the critical concepts and application of software testing and test context creation.
Computer Science Professor
Computer Science Professors teach students about computer science and software development. This course may be of some use in building a foundation in some of the critical concepts and application of software testing.
Project Manager
Project Managers oversee the development and launch of software applications. This course may be of some use in building a foundation in some of the critical concepts and application of software testing.
Product Manager
Product Managers are responsible for the development and launch of software applications. This course may be of some use in building a foundation in some of the critical concepts and application of software testing.

Reading list

We've selected 11 books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Creating Maintainable Contexts for Automated Testing.
Focuses specifically on xUnit testing patterns, offering practical guidance and techniques applicable to test context design and implementation.
Showcases test-driven development practices and principles, providing a foundation for understanding the role of test contexts in the development process.
Provides a thorough introduction to the principles and practices of writing clean and maintainable code, which can be applied to the design and implementation of test contexts.
Offers a comprehensive guide to unit testing principles and practices, complementing the specific focus on test contexts in the course.
Provides techniques for improving the design and structure of code, which can be applied to refactoring test contexts for better maintainability.
Provides a beginner-friendly introduction to design patterns, making it a useful reference for understanding the concepts behind test context design.
Delves deeper into object-oriented programming and software principles, which can provide a background for understanding how to create maintainable test contexts.
Offers a collection of best practices and guidelines for writing effective Java code, contributing to the overall quality and maintainability of test contexts.

Share

Help others find this course page by sharing it with your friends and followers:
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2024 OpenCourser