Skip to content

Test Case Naming Conventions

Ondřej Gajdušek edited this page Sep 3, 2024 · 5 revisions

Objective

Propose a standard nomenclature process for naming test cases

Entities Abbreviations

Entity Singular Plural
Content View cv cvs
Content View Filter cvf cvfs
Content View Version cvv cvvs
Repository repo repos
Organization org orgs
User user users
Location loc locs
Activation Key ak aks
Content Host chost chosts
Operating System os oses
Architecture arch arches
Host host hosts
Lifecycle Environment lce lces
Environment (puppet) env envs
GPG Key gpg gpgs
Partition Table ptable ptables
Provisioning Template template templates
Host Group hostgroup hostgroups
Compute Resource compresource compresources
Capsule capsule capsules
Domain domain domains
Subnet subnet subnets
Realm realm realms
Compute Profile profile profiles
Installation Media media medium
Registry registry registries
Product product products

Examples

  • test_
    • positive_
    • negative_
      • create_
        • composite
      • update_
        • description
      • delete_
      • search_
      • add_
        • repo
        • cv
        • repos
        • cvs
        • puppet_module
        • filter
        • component
      • remove_
        • repo
        • cv
        • repos
        • cvs
        • filter
      • clone_
      • synchronize_
      • promote_
        • with_
          • rh content
          • custom content
        • by_
          • name
          • description
          • label
      • set_
      • end_to_end

Concrete Examples

For Organizations

  • def test_positive_create_with_name
  • def test_positive_create_with_description
  • def test_positive_create_with_label
  • def test_positive_delete_by_name (UI)
  • def test_positive_delete_by_id (CLI)
  • def test_positive_update_name
  • def test_positive_add_location
  • def test_positive_remove_location

For Products

  • def test_positive_create_with_name
  • def test_positive_add_{yum,puppet,doker}_repo
  • def test_positive_add_{yum,puppet,doker}_repos

For Repositories

  • def test_positive_create_with_name
  • def test_positive_create_{yum,puppet,doker}
  • def test_positive_synchronize_{yum,puppet,doker}

For Content Views

  • def test_positive_create_with_name
  • def test_positive_create_with_{yum,puppet,docker} (@tier2 for UI only!)
  • def test_positive_create_composite_with_name
  • def test_positive_add_{yum,puppet,docker}
  • def test_positive_remove_{yum,puppet,docker}
  • def test_positive_publish_{once,multiple}
  • def test_positive_promote_{once,multiple}

For Locations

  • def test_positive_create_with_users
  • def test_positive_add_users
  • def test_positive_update_users

For Hosts

  • def test_positive_update_domain

For tests that verify a Bugzilla or Redmine issue

  • def test_verify_{bugzilla,redmine}_xxxx