Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Tempest tests inheritance hierarchy
BaseDeps
BaseTestCase
tempest.test
tempest.test
OfficialClientTesttempest.scenario.man...
tempest.test.BaseDeps
BaseDeps
Responsibilities
-- Inherit all the assert and matcher methods of
testtools.TestCase
– Inhe...
tempest.test.BaseTestCase
BaseTestCase
SetUpClassCalled : Boolean
Responsibilities
-- Insure test cases call their super's...
tempest.api.network.base
BaseNetworkTest
network_client
networks
subnets
…other lists to keep track of
resources created
R...
tempest.scenario.manager.OfficialClientTest
OfficialClientTest
isolated_creds
manager
compute_client
…other clients
networ...
Upcoming SlideShare
Loading in …5
×

OpenStack Tempest tests class hierarchy

1,324 views

Published on

Published in: Software, Technology, Education
  • Be the first to comment

OpenStack Tempest tests class hierarchy

  1. 1. Tempest tests inheritance hierarchy BaseDeps BaseTestCase tempest.test tempest.test OfficialClientTesttempest.scenario.manager NetworkScenarioTesttempest.scenario.manager TestNetworkBasicOpstempest.scenario.manager All Tempest tests inherit from these classes BaseNetworkTest NetworksTestJSON NetworksTestXML tempest.api.network. base tempest.api.network. test_networks tempest.api.network. test_networks
  2. 2. tempest.test.BaseDeps BaseDeps Responsibilities -- Inherit all the assert and matcher methods of testtools.TestCase – Inherit the attributes functionality from testtools.testcase.WithAttributes -- Inherit the resources management functionality of testresources.ResourcedTestCase TestCase WithAttributes ResourcedTestCase tempest.test testtools testtools.testcasetesttools.testcase testresources
  3. 3. tempest.test.BaseTestCase BaseTestCase SetUpClassCalled : Boolean Responsibilities -- Insure test cases call their super's setUpClass and tearDownClass methods – Set up test case time out – Set up handling of stdout, stderr and log capture -- Provide get_client_manager method for api tests to get credentials and Tempest clients SetUpClass TearDownClass get_client_manager setUp
  4. 4. tempest.api.network.base BaseNetworkTest network_client networks subnets …other lists to keep track of resources created Responsibilities - Get Tempest network client by calling get_client_manager in parent class - Keep track of resources created during setup - Delete resources during tear down - Provide utility methods to create resources SetUpClass tearDownClass create_network create_subnet … other class methods to create test resources 1 1 IsolatedCreds NetworkClientJSON 1 1 tempest.common.isolated_creds tempest.services. network.json. network_client BaseTestCase isolated_creds tempest.test NetworkClientXML NetworkClientBase tempest.services.network tempest.services. network.xml. network_client
  5. 5. tempest.scenario.manager.OfficialClientTest OfficialClientTest isolated_creds manager compute_client …other clients network_client resource_keys os_resources Responsibilities - Get a set of credentials - Get official service clients - Keep track of resources created and delete them in reverse order at end of execution - Provide utility methods for the creation of resources like servers, volumes, security groups, images, etc. SetUpClass credentials alt_credentials admin_credentials tearDownClass set_resource get_resource remove_resource 1 1 IsolatedCreds 1 1 OfficialClientManager Client Client 1 1 1 1 1 1 1 1 tempest.common.isolated_creds tempest.scenario. manager novaclient.client neutronclient.v2.0.client

×