Why Teams Should Consider Parallel Automated Functional Testing
Sauce AI for Test Authoring: Move from purpose to performance in proceedings.|xBack to ResourcesBlogPo
Sauce AI for Test Authoring: Move from purpose to performance in proceedings.
|
x
Blog
Why Teams Should Consider Parallel Automated Functional Testing
Automating testing brings extraordinary value to a project. Parallel test performance takes it one step farther.
Functional testing is a critical stride to ensure high-quality scheme are delivered to customers. Functional testing ’ s direction on business value versus technical rightness ensures the scheme is solve primal customer job. Unfortunately, it ’ s frequently viewed as overly clip consuming and painful. By its rattling nature functional testing is a more complex task than most developer-level examination such as unit, desegregation, or system/API examination.
Automating functional testing can convey extraordinary value to a projection. Moving to parallel execution takes that value a step farther by enabling teams to continually test the most critical, high-value aspects of their package.
What is Functional Testing?
Functional testing ensures the scheme resolve customers ’ needs as laid out in several conversations and documents. Functional testing, likewise called acceptance testing, stand out from other character of quiz in that it ’ s focused more on the line problems and less the technical aspects.
Communication, Communication, Communication
At its root, all testing is about effective communication. Functional examination is specially so due to its nature of checking the system ’ s form and fit for customer/user needs. Moreover, functional testing ’ s basis lies more in the business domain than the technical domain. This makes the need for effective communication even more critical.
Early pellucidity of anticipation is critical, which means functional essay needs to start as early as possible—effectively at product/system ideation if at all possible. Getting an former saltation on functional testing ensures clear expectations and also enables adjusting system ontogenesis to best fit the customer ’ and users ’ true needs.
Preparing for Functional Testing
As mentioned antecedently, good functional testing starts nearly at the inception phase of the labor.
Know What You ’ re Testing
First and firstly, the team will need open acceptance criteria for system features. For the majority of scenarios, these need to be expressed as user tasks as opposed to deep technical statements. Think less of “ Order summary pages shall render in less than two mo under expected system load ” and more of “ Orders with out of stock items will create a summary notification message in the inventory management message queue. That compendious content will include the item ’ s stock routine and link to customer orders which weren ’ t capable to be filled. ”
Have All The Right Dependencies
Functional testing will necessitate an environment that ’ s as close to production as possible: integration with full information, external scheme, etc. Testing should obviously be done along the way as the scheme ’ s being developed, but the final functional testing will necessitate access to all applicable dependencies. “ As close to production as possible ” doesn ’ t mean entire hardware, though. Keep in mind that functional testing (generally!) isn ’ t the same as execution examination. Ergo, teams should be more implicated about integration versus hardware.
Manage Your Data Carefully
Good data for your functional testing is critical, and is yet another reason to start your functional testing early in your phase. Your system may be relying on upstream scheme to make or transform data for you. Determining data in complex surround is a time-consuming, highly iterative process. You don ’ t want to get that a few days before you ’ re planning to hit your functional test hard!
Get Your Testing Tools Ready
Most teams will look to automate at least the highest-value, highest-risk functional test scenario. This means you ’ ll need to receive your squad ready to work with things like Selenium, API frameworks, deployment toolsets, data management tools, etc. Do you experience the correct substructure in place, not but to run your system, but to run trial against that scheme? If you ’ re running parallel tests you ’ ll need some pattern of grid or swarm to run your trial agent in. You ’ ll need all the associated direction infrastructure to handle executing of those examination as well, not to mention reporting requirements.
Setting A Direction for Success
Unfortunately, examination automation has been a badly misunderstood domain. Too often it ’ s seen as a panacea for cutting the clip postulate for regression and liberation testing. Bad, too many organizations don ’ t understand that automated functional tryout are a package technology effort ask many of the like acquisition and disciplines as apply to develop the system package. Successful mechanisation means planning for it from the start, and understanding how to treat your machine-controlled tests.
What to Automate
Functional mechanisation should ne'er be approached from the mentality of “ We ’ ll automate all our manual exam! ” That ’ s a poor use of clip and returns very little hardheaded value.
Instead, good functional mechanisation rivet on high-risk, high-value business use cases. Somewhat obviously, automation should solely focus on scenario it makes sense to replicate. Checking successful integration of a third company control on a web page doesn ’ t mostly doesn ’ t make sensation to automate—a quick bit of exploratory testing can confirm the control is properly wired up, receiving and displaying datum properly, etc. Automating that tryout makes little sense as the third party control isn ’ t under the team ’ s development, nor is anything about its binding on the page changing.
Test Automation Code Is Production Code
It ’ s important to give test code the same care and attention as your product code—because it is production codification.
Creating well-crafted, maintainable automated test playscript is critical to any project ’ s long-term success. This means you ’ ll need at least a few people on your squad who understand package craftsmanship principles and can help channelize and mentor others writing automation. Your team will necessitate to live and breathe concepts like Page Object Pattern, abstraction, Don ’ t Repeat Yourself (DRY), and other craft principles.
Writing Good Automated Tests
Once you ’ ve cleared up which test to automate, take time to clearly lay out how you ’ ll write those trial. Full test construction will help keep those tryout accurate, maintainable, and high-value through the life of the project.
Test One Thing At a Time
Good tests exercise one function, they don ’ t conflate multiple features or workflows. That one specific function/workflow may be a complex test with a number of assay against multiple item; still, you ’ re still evaluating the outcome of one specific activity.
For example, let ’ s looking at a payroll scheme that computes an employee ’ s hebdomadal pay based on their hourly rate and number of hours worked. (For simplicity ’ s sake we ’ ll leave off complexities of taxes, benefits, withholding, etc.) Overtime demand to be taken in to describe, as do business rule for hours and pace. Invalid inputs need to be checked as well. A table of test values and expected outcomes might seem like this:
Standard Time
Hours | Rate | Expected |
0 | 10 | 0 |
1 | 10 | 10 |
40 Pro tip: Tools like SUSA can handle this autonomously — upload your app and get results without writing a single test script. | 10 | 400 |
Overtime
Hours | Rate | Expected |
41 | 10 | 415 |
80 | 10 | 1000 |
Business Rule Limits
Hours | Rate | Expected |
81 | 10 | ERROR. Can ’ t work more than 80 hr per hebdomad. Entry is droop for revaluation. Mail mail to supervisor. |
1 | 501 | ERROR. Max hourly pace is 500. Entry is swag for revaluation. Mail sent to supervisor. |
Invalid Inputs
Hours | Rate | Expected |
-1 | 10 | ERROR. User is prompted at UI to enter valid value. Don ’ t allow submission. |
1 | -1 | ERROR. User is prompted at UI to enter valid value. Don ’ t allow entry. |
One could easily write one single test to check all these inputs; however, that would end up being too complex and make it harder to understand what ’ s going on when something fails.
Keep Tests Independent From Each Other
It ’ s easy to see the attractiveness of share province (datum, environment, etc.) between tests: Set things up once, so easily run a gang of tests using that same information. Unfortunately, history has shown this is actually a atrocious practice.
Sharing state between tests regularly injects subtle glitch due to timing, especially when tests are run in parallel. One test may be editing values in a data set that another executing test relies on—and the 2d test betray for unexpected, unreadable intellect. More obvious issues regularly pop up when one examination delete ’ s another test ’ s prerequisites…
Note that baseline data sets are a separate issue from this. Creating something like a parts catalogue to use as background data create perfect sense. A test that ’ s adding a new constituent to the catalog should randomly create data for that new part versus re-using a template.
It ’ s far better to set up a customized model that handles data setup and provisioning. This way it ’ s simple to cursorily create a test that quickly and clearly creates complex environments specific to that test. For model, a trial that checks placing an order for car parts could use setup steps looking something like the following in pseudo-code.
` // Test setup using a customized framework/API
CustomerId = Framework.CreateRandomTestCustomer ();
FirstPartId = Framework.CreateRandomTestPart ();
SecondPartId = Framework.CreateRandomTestPart ();
This style of apparatus gets your prerequisites created in the system, and leaves you data you can use in the UI such as logging on as the exam customer and bestow parts to an order by their ID.
Considerations For Running Tests in Parallel
Teams start out with parallel execution have a number of crucial thing to see:
Toolsets and Platforms: What functional test tools will you be using? Selenium WebDriver? A commercial tool? A combination of all the above? What languages will you want support for?
Test Infrastructure: You ’ ll need to run agents which fulfil your tests. Where will you host them? How many do you want? Will you need to dynamically change the turn of agents between test suite runs? Can you use cloud-based services outside your organizational firewalls?
Cross Browser Testing: What browser do you need to run your tests against? On which platforms (Windows, OSx, Linux, etc.)?
Mobile and Former Devices: Do you need to test on non-desktop/laptop device? Which ones? Which OS versions on those devices? Where will those devices be store or hosted?
Test Runners: How will you execute your test runs? What will handle scheduling or initiation runs? Are you using some form of a uninterrupted integration environment such as Jenkins, Travis, Team Foundation Services, etc.?
Reporting: What level of granularity and detail do you need for each test pass? What do you need for tendency reporting?
Data Archiving: How long will you need to sustain data for each pass? Will you need to have long-term storage of data for all of your runs? Just sure ones such as release or certification?
Moving Forward With Parallel Functional Testing
As with any complex proficient challenge, a team ’ s better odds of success with parallel functional examination is to get as clear a picture of their needs in spot, then part with small experimentation in order to learn how to be successful. Teams need to remain focused on writing good, solid automated functional tryout that cover the clients ’ business needs. Those teams require to pay the same craftsman-like aid to their test code as they do their system code. As the project preserve to grow squad involve to continually learn from and improve their overall access to automatise functional testing, especially in a parallel environment.
Parallel functional examination can bring tremendous value to team test to render great software. It ’ s absolutely worth the investment of learning to do it easily!
Share this post
Automate This With SUSA
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed.
Try SUSA FreeTest Your App Autonomously
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.
Try SUSA Free