Skip to main content

Setup a Process for Test Case Development

Test cases should be handled in the same way as source code, and the state-of-the-art method for storing source code is Git. Connect your Git repository to Botium and use it for versioning your test cases. In this article, we describe the recommended Botium structure for test case development.

Local Repository vs Linked Repository

  1. Local: Botium comes with an integrated local repository: test case scripts and excel files are stored within the Botium database.

  2. Linked: Botium also allows you to connect to linked repositories. Test case scripts and excel files are stored in a remote location linked to the Botium. Currently supported linked repositories are:
    • Git Repositories, for example Bitbucket, Gitlab or Github

    • Shared Folders connected to the Botium server

    • Download Links to retrieve test case content from an external HTTP server or Google Sheets

      Tip: You should always keep the test cases in a linked repository (preferred is Git), as the local repository doesn't have many options for making backups, versioning etc. We will follow best practices from software development:
      • There is a development environment which will be used for developing the test cases

      • There is a production environment which will be used for running the finished and approved test cases

      • Snapshots of the test cases will be transferred from development to production environment on certain events (end of sprint, before go-live, …)

Preparing the Test Case Development Process

We will introduce a suggestion for the test case development process (yes, you should handle, and call it like a software development process):
  • You are using the Live Chat, the Botium Crawler or the Convo Editor for composing your test cases

  • There is a Git repository for holding the test cases

We will create two test sets, one to place the test case scripts during development phase, and another one to use for the regular Botium test runs.
  1. First Test Set | Development: This test set is intended for development:
    1. Create Test Set: Create a test set and ensure you select 'Use Test Cases from Botium only' in the Content Selection Type within the Test Set Configuration.

    2. Connect your Git Repository: Navigate to Botium Tools & Settings > Test Sets > Your Test Set > Configuration > External Connections > NEW, and connect your Git repository.

      Note: You should point to your Git main branch here. Later you can choose to not directly commit your test case scripts to the master branch but to separate feature branches.
    3. Create Project: Create a new Test Project that points to your Development Chatbot and this Development Test Set with Botium Repository Test Set.
  2. Second Test Set | Ready2Test :
    1. Create Test Set: Create a second test set, and this time ensure you select 'Use Test Cases from External Connections only' in the Content Selection Type within the Test Set Configuration.

    2. Connect your Git Repository: Again, navigate to Botium Tools & Settings > Test Sets > Your Test Set > Configuration > External Connections > NEW, and connect your Git repository.

    3. Create Project: Create a new Test Project that points to your Development Chatbot and this Ready2Test Test Set.

Implementing the Test Case Development Process

As usual, this development process is running in cycles - you can and should repeat it as often as required.

  1. Working on Test Cases: In the Development test set, you can use all Botium tools to create and edit your test cases, you can even combine all of them.
    • Use the Convo Editor or the Script Editor to manually compose your test cases step by step

    • Use the Live Chat to record your conversations with your chatbot and save it as test case

    • Use the Botium Crawler to automatically detect your conversation branches

    Tip: Using Botium Excel Sheets for setting up this process is not suggested, as Git features like version tracking and pull requests work best on plain text files.
  2. Verifying Test Cases: You can use the Development test project to run test sessions against your development chatbot to verify that the test set itself is complete and working. As you selected 'Use Local Repository only' above for this test set, only the local repository with your own test set will be used for the test session, not the test cases in the linked Git repository.
    Note: You can consider the Development test set as the sandbox where the unpublished test case scripts are placed, before they are committed to Git and published to other project members.
    As soon as you consider your test set to be complete, it is time to publish it to Git.
  3. Export Snapshot to Git Repository: Use the Export function and select 'to Git Repository' to export a snapshot of your test set to the Git repository now.

    Navigate to Botium Tools & Settings > Test Sets > Your Tests Set > Test Cases > Export > to Git Repository

    The Git check-in screen will look familiar to software developers:

    • You can choose a branch to commit your test cases to (and your Git credentials if required)

    • There should be a check-in comment describing the changes you have done

    Tip: We recommend avoiding direct pushes to the main branch. Instead, push to a feature or development branch and follow the established Git workflows of Pull Request, Review, and Merge to integrate test cases into the main branch
    Warning: The test case scripts will be exported to the Git repository as files, overwriting any existing test case scripts.
You can use all Git features in your Git repository now: feature branches, pull requests, revert changes, version history, ...

Setup Continuous Testing Pipeline

In your Ready2Test Test Set, use the 'Update Statistics & Insights' function to pull the main branch content from the linked Git repository into Botium and verify the test case content..

Note:

You are now ready to use this test set in your Continuous Testing pipeline. Botium will automatically pull all test case changes from Git during each test execution.

Was this article helpful?

0 out of 0 found this helpful