File python-sst.spec of Package python-sst

#
# spec file for package python-sst
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           python-sst
Version:        0.2.4
Release:        0
Summary:        SST - Web Test Framework
License:        Apache-2.0
Group:          Development/Languages/Python
Url:            http://testutils.org/sst
Source:         http://pypi.python.org/packages/source/s/sst/sst-%{version}.tar.gz
BuildRequires:  python-EasyProcess
BuildRequires:  python-PyVirtualDisplay
BuildRequires:  python-argparse
BuildRequires:  python-decorator
BuildRequires:  python-devel
BuildRequires:  python-entrypoint2
BuildRequires:  python-junitxml
BuildRequires:  python-python-subunit
BuildRequires:  python-selenium
BuildRequires:  python-setuptools
BuildRequires:  python-testtools
BuildRequires:  python-unittest2
Requires:       python-EasyProcess
Requires:       python-PyVirtualDisplay
Requires:       python-argparse
Requires:       python-decorator
Requires:       python-entrypoint2
Requires:       python-junitxml
Requires:       python-python-subunit
Requires:       python-selenium
Requires:       python-testtools
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch:      noarch
%endif

%description
SST (selenium-simple-test) is a web test framework that uses Python
to generate functional browser-based tests.

Tests are made up of scripts, created by composing actions that drive
a browser and assert conditions. You have the flexibilty of the full
Python language, along with a convenient set of functions to simplify
web testing.

SST consists of:

 * user actions and assertions (API) in Python
 * test case loader (generates/compiles scripts to unittest cases)
 * console test runner
 * data parameterization/injection
 * selectable output reports
 * selectable browsers
 * headless (xvfb) mode
 * screenshots on errors

Test output can be displayed to the console, saved as an HTML report, or
JUnit-compatible XML for compatibility with CI systems.

%prep
%setup -q -n sst-%{version}

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
# remove shebangs from all scripts
find %{buildroot}%{python_sitelib} -name '*.py' \
     -exec sed -i -e '1{/^#!/d}' {} \;

%check
python setup.py test

%files
%defattr(-,root,root,-)
%doc README examples
%{_bindir}/sst-remote
%{_bindir}/sst-run
%{_bindir}/sst-test
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by