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.

Unfortunately, the one main implementations I might discover for the Screenplay Pattern on the time had been Serenity BDD in Java and JavaScript. My firm was a .NET store. I regarded for C# implementations, however I didn’t discover something that I trusted. So, I took issues into my very own fingers and carried out the Screenplay Pattern myself in .NET. Initially, I carried out Selenium WebDriver interactions. Later, my staff and I added RestSharp interactions. We finally launched Boa Constrictor as an open supply mission in October 2020 as a part of Hacktoberfest.

With Boa Constrictor, I personally sought to reinvigorate curiosity within the Screenplay Pattern. By bringing the Screenplay Pattern to .NET, we enabled people outdoors of the Java and JavaScript communities to present it a strive. With our wealthy docs, examples, and movies, we made it simple to onboard new customers. And by means of convention talks and webinars, we popularized the ideas behind Screenplay, even for non-C# programmers. It’s been superior to see so many people within the testing group begin speaking in regards to the Screenplay Pattern previously few years.

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.

Source link