Selenium Test Cases

Selenium Test Cases Overview

A test case is a set of conditions under which a tester will determine whether an application or one of its features is working as it was originally established for it to do. A test case is often referred to as a test script when written and may be collated into test suites. Within Copado a Selenium Test Case is typically created and edited with the Copado Selenium IDE, but experienced users can create and edit Selenium Test Cases manually. When a Test Case is recorded using the recorder, interactions on Salesforce or your website are captured automatically and assertions can be made based on the expected output.

Recording Selenium Test Cases

To record a Selenium Test case you will need to complete the following prerequisites:

  1. Follow the Getting Started instructions.
  2. When a Selenium Test Case is created, the default values are the ones used upon creation/recording. 
  3. Use the "+ new dataset" button to override the recorded values and reuse the same script with different data.
  4. Dataset will be available when creating a Selenium Test Suite.
  5. Versioning: Copado allows you to track version of the Selenium Test Cases, this way a Selenium Test Case can be promoted same way as the metadata changes are promoted into higher sandboxes or production orgs. Promote and Rollback will show the usage of the current version and mass updated the Selenium Test Suites with a newer or older version.

To make your Test Cases more reusable and environment agnostic, use Environment Variables and Group Variables.

Promote Test Case Version

Assuming you have your Test Case version 1 already in use on various Suites, you need to make some changes on the Test Case to reflect new functionality. Here is a step by step instructions to create a new version and promote it.

  • Go to the version 1 test case
  • Press the button "New Version". This will clone the Test case, and increase the version number, version 2.
  • Press the button "Promote Version"
  • A list of test cases per suite will be displayed where version 1 is being used
  • Select which ones should be promoted to version 2
  • Press "Save"
  • Now the selected Test suites are using version 2.
  • You can now start making changes to version 2

Rollback Test Case Version

Assuming you have your Test Case version 2 already in use on various Suites, you need to rollback test suites to use test case version 1, since version 2 might be faulty . Here is a step by step instructions to rollback to a previous version.

  • Go to the version 2 test case
  • Press the button "Rollback to Previous Version"
  • A list of test cases per suite will be displayed where version 2 is being used
  • Select which ones should be rollbacked to version 1
  • Press "Save"
  • Now the selected Test suites are using version 1.
Comments