I began Boa Constrictor again in 2018 as a result of I loathed web page objects. On a earlier mission, I noticed web page objects balloon to a number of thousand strains lengthy with duplicative strategies. Developing new assessments turned a nightmare, and about 10% of assessments failed each day as a result of they didn’t deal with ready correctly.
So, whereas getting ready a take a look at technique at a brand new firm, I invested time in studying the Screenplay Pattern. To be trustworthy, the sample appeared a bit complicated at first, however I used to be prepared to strive something apart from web page objects once more. Eventually, it clicked for me: Actors use Abilities to carry out Interactions. Boom! It was a clear separation of issues.
I additionally wished to offer a standalone implementation of the Screenplay Pattern. Since the Screenplay Pattern is a design for automating interactions, it might and will combine with any .NET take a look at framework: SpecFlow, MsTest, NUnit, xUnit.internet, and any others. With Boa Constrictor, we targeted singularly on making interactions as glorious as doable, and we let different initiatives deal with separate issues. I didn’t need Boa Constrictor to be locked into any specific device or system. In this sense, Boa Constrictor diverged from Serenity BDD – it was not meant to be a .NET model of Serenity, regardless of taking a lot inspiration from Serenity.
Furthermore, within the design and all of the messaging for Boa Constrictor, I strived to make the Screenplay Pattern simple to grasp. So many of us I knew gave up on Screenplay previously as a result of they thought it was too sophisticated. I wished to interrupt issues down in order that any automation developer might choose it up rapidly. Hence, I shaped the soundbite, “Actors use Abilities to carry out Interactions,” to explain the sample in a single line. I additionally coined the mission’s slogan, “Better Interactions for Better Automation,” to obviously talk why Screenplay needs to be used over alternate options like uncooked calls or web page objects.
So far, Boa Constrictor has succeeded modestly properly in these objectives. Now, the mission is pursuing another aim: democratizing the Screenplay Pattern.
At its coronary heart, the Screenplay Pattern is a generic sample for any sort of interactions. The core sample shouldn’t favor any specific device or bundle. Anyone ought to have the ability to implement interplay libraries utilizing the instruments (or “Abilities”) they need, and every of these libraries needs to be handled equally with out choice. Recently, in our plans for Boa Constrictor 3, we introduced that we wish to create separate packages for the “core” sample and for every library of interactions. We additionally introduced plans so as to add new libraries for Playwright and Applitools. The present libraries – Selenium WebDriver and RestSharp – needn’t be the one libraries. Boa Constrictor was by no means meant to be merely a WebDriver wrapper or a superior web page object. It was meant to offer higher interactions for any sort of take a look at automation.
In model 3.0.0, we efficiently separated the Boa.Constrictor mission into three new .NET initiatives and launched a NuGet bundle for every:
This separation allows people to choose the elements they want. If they solely want Selenium WebDriver interactions, then they’ll use simply the Boa.Constrictor.Selenium bundle. If they wish to implement their very own interactions and don’t want Selenium or RestSharp, then they’ll use the Boa.Constrictor.Screenplay bundle with out being compelled to tackle these additional dependencies.
Furthermore, we continued to take care of the “basic” Boa.Constrictor bundle. Now, this bundle merely claims dependencies on the opposite three packages so as to protect backwards compatibility for people who used earlier model of Boa Constrictor. As a part of the improve from 2.0.x to three.0.x, we did change some namespaces (that are documented within the mission changelog), however the remainder of the code remained the identical. We wished the improve to be as simple as doable.
The core contributors and I’ll proceed to implement our plans for Boa Constrictor 3 over the approaching weeks. There’s so much to do, and we are going to do our greatest to implement new code with thoughtfulness and high quality. We will even attempt to maintain every thing documented. Please be affected person with us as growth progresses. We additionally welcome your contributions, concepts, and suggestions. Let’s make Boa Constrictor glorious collectively.