Giter VIP home page Giter VIP logo

integration_tests's Introduction

ManageIQ - Integration tests

Code Health Dependency Status Join the public chat at https://gitter.im/ManageIQ/integration_tests License: GPL v2

Docs and guides

Downstream and Upstream version support

Integration_tests was developed for the upstream MIQ community largely with contributions from Red Hat CloudForms quality engineers.

The master and downstream-stable branches of the integration_tests repository are written to always support MIQ 'master' branch builds.

Downstream CloudForms builds are supported by the framework as well, with a rolling window of active version support

Contributions to the master branch must support MIQ master and the following versions of Red Hat CloudForms:

  • 5.11.z

Legal

Copyright 2013 Red Hat, Inc. and/or its affiliates.

License: GPL version 2 or any later version (see COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html for details).

integration_tests's People

Contributors

akarol avatar amavinag avatar apagac avatar aweiteka avatar bcrochet avatar bsquizz avatar dajohnso avatar dajorh avatar digitronik avatar gshefer avatar hhovsepy avatar izapolsk avatar jan-zmeskal avatar jawatts avatar jkrocil avatar john-dupuy avatar lcouzens avatar mkoura avatar mshriver avatar nachandr avatar niyazredhat avatar ohiliazo avatar psav avatar quarckster avatar ronnypfannschmidt avatar sbulage avatar sshveta avatar tpapaioa avatar valaparthvi avatar vrutkovs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

integration_tests's Issues

Logging!

We're using the logging module in a few places, and in general it would be helpful to have more debug logging for some of our more intricate tests. We should add log handlers to pick up those log messages and put them somewhere useful.

There are some good snippets about this in this stacko post and replies, though some tweaks would be needed for our environment:
http://stackoverflow.com/questions/4673373/logging-within-py-test-tests

Add tooling to enable creating data files using .templates files and cfme_data.yaml

Many data files, like PXE Provisioning kickstart files and customization templates, have a standard format that could be saved in a .template file but also include links to live servers, passwords and other sensitive data.

It's becoming increasingly useful to have a utility that could use .template files and incorporate entries from cfme_data.yaml to build real, usable data files.

Further discussions about the idea were captured here (closed PR):
#101

Make cfme_data.yaml grok "randomize me"

As a test creator, I want to put data into cfme_data.yaml, but be able to mark certain fields as "random". When looked up, it should return a random value of a given type (string, int, uuid, int with bounds, etc).

Be able to run rake tasks on appliances

For distributed testing, we'll need to be able to change an appliance's region. This is traditionally done via the "black console", which wraps a rake task:
"rake evm:db:region -- --region (region_number)". Additionally, appliances will soon start shipping with databases disabled; enabling the DB may also be a rake task.

We've already got SSH functionality via paramiko, so this can probably a pretty thin wrapper around that, targeted at running rake tasks.

Create a fixture for provisioning and destroying appliances in a test run

This would be particularly useful for distributed test cases (multi-region, multi-appliance per zone, etc), but could also be used anywhere else a stunt VM is needed in a test case. Ideally, the fixture would return a list of objects that can be used to generate base_urls for mozwebqa, ssh clients, etc, for use in related tests.

I'm currently targetting provisioning using the SOAP interface, but we may have to fall back on going through the UI if we can't find good documentation on the SOAP provisioning methods.

Distributed Testing Tracking Issue

Things that we need to make distributed testing happen
(work in progress, add things as needed til it's done)

  • #64: provisioning fixture
  • #66: dynamic selenium targeting
  • #67: be able to run rake tasks

Be able to point selenium at multiple appliances within a single test

Currently, we can aim selenium at one appliance and run all of our tests against it. This is useful for most of our test cases, but when we're setting up and testing distributed appliance cases we'll need to be able to interact with multiple appliances in a single test run (e.g. configuring an appliances to replicate its database for a multi-region setup, configuring specific server roles to ensure failover is working, etc).

Document development guidelines

We need a doc that goes into a little more detail on the project layout, coding/testing standards, etc. Preliminary work on this has already been done, but it needs to be fleshed out and dropped into the github wiki.

unable to specify specific cfme_data yamls

It would seem #74 broke support for specifying the cfme_data.yaml file on the command line

(default)[dajohnso@localhost cfme_tests]$ py.test tests/ui/services/test_vm_power_control.py -k on --pdb --collectonly --credentials=/home/dajohnso/workspace_cfme/cfme-qe-yamls/default/credentials.yaml --untrusted --cfmedata=/home/dajohnso/workspace_cfme/cfme-qe-yamls/default/cfme_data.yaml
No cfme_db_url defined
================================================================================== test session starts ==================================================================================
platform linux2 -- Python 2.7.3 -- pytest-2.3.4
plugins: mozwebqa
collected 0 items / 2 errors

======================================================================================== ERRORS =========================================================================================
______________________________________________________________ ERROR collecting tests/ui/services/test_vm_power_control.py ______________________________________________________________
tests/ui/services/test_vm_power_control.py:35: in pytest_generate_tests

  data = load_cfme_data()

utils/cfme_data.py:39: in load_cfme_data
raise Exception(msg)
E Exception: Usable to load cfme_data file at /home/dajohnso/workspace_cfme/cfme_tests/cfme_data.yaml
______________________________________________________________ ERROR collecting tests/ui/services/test_vm_power_control.py ______________________________________________________________
tests/ui/services/test_vm_power_control.py:35: in pytest_generate_tests
data = load_cfme_data()
utils/cfme_data.py:39: in load_cfme_data
raise Exception(msg)
E Exception: Usable to load cfme_data file at /home/dajohnso/workspace_cfme/cfme_tests/cfme_data.yaml

Consolidate default server roles

Default roles are defined in multiple places at the moment:

Furthermore, the default roles in the cfme_data template aren't actually the default roles on a freshly made appliance, as the ems_metrics (cap&u) roles aren't on by default.

I propose replacing the default roles in the cfme_data template with the ones listed in fixtures.server_roles.

If necessary, we can populate the default_roles list in fixtures.server roles from the cfme_data template to keep it backward compatible.

Move fixtures to cfme_pages

pages tests can benefit from the navigation fixtures, and navigation from page to page itself seems like the sort of thing that should be abstracted in the pages repo.

@bcrochet Is already doing this, but I thought I'd be nice and make an issue for it.

Add SCP support

The ssh_client fixture supports running a rake command. Some of these commands presuppose a local file exists on the appliance, such as when importing an Automate custom namespace. Extending ssh_client would be ideal.

Here's my os.system hack:

import os
...
os.system("sshpass -p '%s' scp %s@%s:/root/" % \
            (mozwebqa.credentials['ssh']['password'],      
             mozwebqa.credentials['ssh']['username'], 
             soap_client.evm_server_hostname))

Flash message updated causes failing test

In tests/ui/infrastructure/test_infrastructure_providers.py, TestInfrastructureProviders.test_provider_add_with_bad_credentials[rhevm32] fails in this way:

first = u'401 Unauthorized', second = 'Cannot complete login due to an incorrect user name or password.', msg = 'Flash message did not match expected value'

    @classmethod
    def equal(self, first, second, msg=None):
        """
            Asserts that 2 elements are the same

            :Args:
             - First object to be tested
             - Second object to be tested
             - Message that will be printed if it fails
            """
>       assert first == second, msg
E       AssertionError: Flash message did not match expected value

The expected message of '401 Unauthorized' seems wrong, so the test just needs a quick update to look for the new (and correct) flash message.

I think there was a BZ opened about the '401 Unauthorized' message, so some spelunking in ought to be done to find and verify that.

Why unittestzero?

Is there any benefit to requiring unittestzero as a dependency?
unittestzero syntax: Assert.true(ms_pg.is_the_current_page)
native python syntax: assert ms_pg.is_the_current_page

py.test has inconsistent behavior with conftest import order

py.test adds test directories seemingly inconsistently based on invocation, e.g. py.test -k test will result in a different sys.path than py.test tests/. This is causing the 'from common.mgmt_system' import in tests/conftest.py to fail. To ensure this import works every time, the cleanest solution is probably to move mgmt_system related fixtures into the fixtures dir, where they'll be autoloaded.

More detail can be found in the guts of this bug report:
https://bitbucket.org/hpk42/pytest/issue/82/syspath-is-extended-with-every-dir

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.