A schedule enables LEAPWORK users to define when flows should run, and on which agents - whether at pre-selected times or after specified time intervals. Schedules can be triggered either on-demand (such as through REST API calls to LEAPWORK) or at a single or recurring time interval.
Why should I use schedules?
Users can leverage the power of schedules to achieve many scenarios that otherwise look strenuous. One of the major challenges most organizations face is running automation in a continuous manner and ensuring the optimum usage of agents by doing parallel testing. When you follow best practices, LEAPWORK schedules can help you to overcome these challenges.
When should I use Schedules?
Execute Unattended Automation
If you wish to execute your test cases automatically without manual interventions, you will need to schedule your tests. With LEAPWORK, you can configure the time recurrence of the schedule, which will enable you to test even when you are away from the office.
Achieve Continuous Testing
Continuous testing is the process of executing automated tests as part of the software delivery pipeline in order to get early feedback for each release candidate. It advances and stretches out test automation to address the complexity and pace of application development and delivery. You can use the LEAPWORK schedule functionality to achieve continuous testing with minimal effort.
Achieve Parallel Testing
Parallel Testing implies testing various applications or sub-components of one application simultaneously to decrease testing time. Parallel tests consist of two or more parts (projects or project suites) that check the different flows or functional attributes of an application. These flows are executed on individual computers or devices simultaneously. The ability to test more than one application part "in parallel" enables you to reduce test time and become more efficient. The use of schedules in LEAPWORK is strongly recommended for parallel testing.
Implement CI/CD Pipeline
A CI/CD pipeline is the foundation of a cutting edge DevOps setup. It overcomes any issues among development and operations teams by automating the building, testing, and deployment of applications. Automated pipelines remove manual errors, provide standardized development feedback loops, and enable fast product iterations. LEAPWORK's Public REST API enables you to use schedules to support the implementation of a CI/CD pipeline.
How should I use schedules?
Continuous Testing using schedules
Scheduling is one of the major features in LEAPWORK. If used correctly, it can ensure less time to market and high product quality with a reduction in development costs.
There are two ways to run schedules and perform continuous testing:
Triggering the schedule using LEAPWORK's REST APIThe schedule can be hooked to your ALM (Application Lifecycle Management) or build and deployment tools. This means your deployment tool can trigger LEAPWORK's REST API endpoint to start the automated tests on the given environment. For example, one scenario is to make an automated test pass into your manual test entry criteria. This can be achieved by triggering a smoke test schedule in LEAPWORK at the post-deployment stage of the build. If the smoke test suite passes then the manual testing team can enter into the testing phase for new features.
Use the scheduler to test continuouslyLEAPWORK's scheduler has a feature that enables users to execute tests at regular intervals. For example, if you know your code is deployed to the test environment every 2 hours, then it makes sense to schedule the tests to run soon as the build is deployed, and to test it twice instead of once. If the first test fails due to an environmental or other external factor, this can be verified in a second test run. Here is a screenshot of how to schedule a recurrence.
Run parallel tests to reduce time to production
Running tests in parallel can give benefits like:
- Time saving: Running test in parallel reduces the time of execution drastically, which means you can test faster and get quicker feedback
- Better test coverage: Testing on multiple configurations can be achieved with multiple agents set up with different browsers and platforms
- Fewer flows: One flow can be used to test multiple environments, which means one test can cover many configurations thereby reducing the number of tests
- CI/CD: Due to faster feedback you can make UI tests part of CI/CD pipelines
LEAPWORK enables users to run multiple flows at the same time in different machines by executing them in parallel. Users can also run tests as pairwise, where each flow will run on all selected environments to test all possible discrete combinations. The following article explains how to achieve parallel and pairwise tests in LEAPWORK.
Set an automatic notification after test execution is completed
Automatic notifications help the team to be on the same page and take prompt actions if a test fails. LEAPWORK provides an 'Actions' option, where users can add actions that are triggered on specified conditions. Each schedule can contain multiple actions. Using these options ensures timely notifications about failures so the team can fix bugs quickly to save time and costs.
For more detail, please visit the scheduler's action page.
Stop testing if test failure reaches a certain threshold
If your test environment is not working or there is a bug in the application that does not allow you to test properly, then it makes sense to stop/skip the execution of your automated test to save resources and ensure the team can take corrective actions quickly.
Let's try to understand this scenario with an example: Assume your login feature is not working and you are using that feature in 80% of your test cases. If you're executing your test, you will usually come to know this after a full test automation run is completed. This might take hours if you have a large number of tests, which means you have wasted resources and time.
Instead, LEAPWORK enables you to stop the execution run if 20% of tests fail or if the user wants to disable the scheduler on the failure of 'n' number of test flows. With this feature, you can get quick notifications of failure and fix the underlying issue instead of wasting time and resources.
Here is how you can configure error handling in LEAPWORK:
The LEAPWORK scheduler provides control over automation flows and helps to optimize time and resources. Among many things, it includes the following:
- Granular control to run flows once or more at specific times during the day, in specific time-zones
- The estimated run time is automatically calculated based on past performance and parallelization options
- Recurring schedules can be controlled with working hours windows and queue options
- Steps in a run-list can be easily parallelized; either divided out across selected agents or run on all
- Scheduled runs can be skipped or robustly queued based on the agent's busy status
- It can be used with CI/CD systems to ensure faster time to market