Test Plan for File templates in the Web IDE

Test Plan

Introduction

GitLab currently provides access to a few file templates via the edit interface (e.g., Repository > Files > New File).

This test plan covers the addition of file templates to the Web IDE in gitlab-ce#47947.

Scope

  • This plan covers the Web IDE, not the existing edit interface.
  • Vendor/GitLab templates already exist, but when custom templates are available this plan could be re-used and the collection of templates could be extended to cover a reasonable selection of filetypes.
  • The plan focusses on functional testing.

ACC Matrix

The matrix below identifies the Attributes, Components, and Capabilities relevant to the scope of this test plan.

Attributes (columns) are adverbs or adjectives that describe (at a high level) the qualities testing is meant to ensure Components have.

Components (rows) are nouns that define major parts of the product being tested.

Capabilities link Attributes and Components. They are what the product needs to do to make sure a Component fulfills an Attribute.

For more information see the Google Testing Blog article about the 10 minute test plan and this wiki page from an open-source tool that implements the ACC model

The Web IDE is accessible via the Project and Repository menus, but it's mainly a Repository function so most of the other components of the system are not included.

The API is included assuming a GET /templates route is added to list available templates.

The numbers indicate the count of Capabilities at each intersection of Attribute and Component

Secure Responsive Intuitive Reliable
Repository 2 7 3
API 3

Capabilities

Respository is Intuitive

  • It's easy to select the desired file template
  • It doesn't require unnecessary actions to save the change
  • It's easy to undo the change after selecting a template
  • Selecting a template is intuitive
  • Undoing a change is intuitive
  • It's hard for a user to accidentally overwrite an existing file
  • The user interface is consistent and clear

Respository is Responsive

  • The list of templates can be restricted to allow a user to find a specific template among many
  • Once a template is selected the file content updates quickly and smoothly

Respository is Reliable

  • Adding a new file from a template does not affect other files
  • Changing an existing file does not affect other files
  • Changes are reflected in the file stored in the repository

API is Intuitive

  • All valid API methods and parameters are documented
  • API methods and parameters have names that convey intent
  • Error messages are clear and instructive

Test Plan

There are no existing automated end-to-end tests of the Web IDE, however there is a test of adding and editing a file via the edit interface, which could be used for comparison. There are also feature tests of templates using the edit interface, e.g., spec/features/projects/files/template_type_dropdown_spec.rb

This feature is simple enough that the set of Capabilities are sufficient to guide a test session. Note that some of the Capabilities don't lend themselves to automation, however the aim is to automate as much as possible.

This test plan will be used as an example, so for the sake of illustration if this were a more complex test plan it might include items like these:

Scenario 1: Add files

  • Add files based on each template
  • Add a file and change the content the template provides
  • Verify that the added files appear in the repository

Scenario 2: Replace files

  • Replace existing files with each template
  • Verify that the change appears in the repository

Scenario 3: Undo changes

  • Add a new file and then undo it
  • Replace an existing file and then undo it
  • Verify that the repository isn't changed
Edited Oct 18, 2018 by Mark Lapierre
Assignee Loading
Time tracking Loading