Skip to content
This repository was archived by the owner on Mar 26, 2024. It is now read-only.

Commit fee500b

Browse files
author
Matthew J. Bryan
committed
Bump docs and link to it from README.
1 parent cc7d86b commit fee500b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+4632
-3088
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
# py-combtest
2-
Testing using combinatorics, and the infrastructure to run those test cases in parallel, possibly across multiple machines
2+
# This lib still under construction
3+
4+
Testing using combinatorics, and the infrastructure to run those test cases in parallel, possibly across multiple machines.
5+
Includes human-readable descriptions of the generated test cases, and deterministic replay mechanisms.
6+
7+
Full docs [here](docs/index.html).
8+

_src_doc/examples.rst

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ provide.
8787
are a few examples.
8888

8989
Providing a custom ``state`` object: ::
90+
9091
# You can provide some instance to serve as the state passed around during
9192
# the tests. There are two important details to know about this:
9293
# * The state must be JSON-ifiable, but py-combtest provides a convenience
@@ -194,7 +195,24 @@ exactly the same way they provide other ``Actions``. ::
194195
Action3],
195196
...)
196197

198+
Notice above that the ``SerialAction`` is treated like any other. The framework
199+
will run all ``Action1`` and ``Action2`` in parallel, wait for them to finish,
200+
run ``ChangeConfigSerialAction`` once, then run all ``Action3`` in parallel. If
201+
the ``SerialAction`` had more than one option, each option will be run one at a
202+
time, serially.
203+
204+
Distributed Test Execution
205+
============================
206+
207+
``py-combtest`` provides a number of ways to execute tests in a distributed +
208+
parallel fashion. The mechanisms for that are as follows:
197209

210+
* A generalized thread pool implementation that can execute multiple callables
211+
in parallel in a given process. (:class:`ThreadPool`)
212+
* An ``rpyc`` -based service which receives lists of tests (or portions
213+
of tests) to run, dispatches them to a thread pool for for execution, and
214+
which collects outputs, statistics, etc. (:class:`CoordinatorService`)
215+
* A client class that starts
198216

199217
Notes on Serialization
200218
========================
@@ -222,11 +240,19 @@ former provides some JSON-ifiable object. ``py-combtest`` will recursively call
222240
custom class with a ``to_json`` method, the above example will still work.
223241

224242
The latter receives a copy of that object during deserialization and returns
225-
a deserialized instance of the given class.
243+
a deserialized instance of the given class. That is: it maps the thing
244+
returned by ``to_json`` on the class's constructor.
226245

227246
Logging and Replay
228247
====================
229248

249+
There are three main types of logging ``combtest`` uses:
250+
* Standard Python logging, which the user can leverge as normal
251+
* An extension to Python logging, called :class:`central_logger`; the user
252+
can treat this like standard Python logging, but logs will automatically
253+
be sent between
254+
255+
230256
Config
231257
========
232258

docs/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 449dd26be74996493fe3d95877e8ccae
3+
config: 14dff5ab0e20fa587ff5f84e6a552bf2
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs/_modules/combtest/action.html

Lines changed: 187 additions & 132 deletions
Large diffs are not rendered by default.

docs/_modules/combtest/bootstrap.html

Lines changed: 86 additions & 49 deletions
Large diffs are not rendered by default.

docs/_modules/combtest/config.html

Lines changed: 69 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,35 @@
1+
12
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
23
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
34

4-
55
<html xmlns="http://www.w3.org/1999/xhtml">
66
<head>
7+
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
78
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8-
9-
<title>combtest.config &mdash; py-combtest 1.0.0.0 documentation</title>
10-
9+
<title>combtest.config &#8212; py-combtest 1.0.1.0 documentation</title>
1110
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
1211
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
13-
14-
<script type="text/javascript">
15-
var DOCUMENTATION_OPTIONS = {
16-
URL_ROOT: '../../',
17-
VERSION: '1.0.0.0',
18-
COLLAPSE_INDEX: false,
19-
FILE_SUFFIX: '.html',
20-
HAS_SOURCE: true
21-
};
22-
</script>
12+
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
2313
<script type="text/javascript" src="../../_static/jquery.js"></script>
2414
<script type="text/javascript" src="../../_static/underscore.js"></script>
2515
<script type="text/javascript" src="../../_static/doctools.js"></script>
26-
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
27-
<link rel="top" title="py-combtest 1.0.0.0 documentation" href="../../index.html" />
28-
<link rel="up" title="Module code" href="../index.html" />
16+
<script type="text/javascript" src="../../_static/language_data.js"></script>
17+
<link rel="index" title="Index" href="../../genindex.html" />
18+
<link rel="search" title="Search" href="../../search.html" />
2919

20+
<link rel="stylesheet" href="../../_static/custom.css" type="text/css" />
21+
3022

3123
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
3224

33-
</head>
34-
<body role="document">
25+
</head><body>
26+
3527

3628
<div class="document">
3729
<div class="documentwrapper">
3830
<div class="bodywrapper">
31+
32+
3933
<div class="body" role="main">
4034

4135
<h1>Source code for combtest.config</h1><div class="highlight"><pre>
@@ -54,9 +48,9 @@ <h1>Source code for combtest.config</h1><div class="highlight"><pre>
5448

5549
<span class="kn">import</span> <span class="nn">six</span>
5650
<span class="k">if</span> <span class="n">six</span><span class="o">.</span><span class="n">PY2</span><span class="p">:</span>
57-
<span class="kn">from</span> <span class="nn">ConfigParser</span> <span class="kn">import</span> <span class="n">SafeConfigParser</span>
51+
<span class="kn">from</span> <span class="nn">ConfigParser</span> <span class="k">import</span> <span class="n">SafeConfigParser</span>
5852
<span class="k">elif</span> <span class="n">six</span><span class="o">.</span><span class="n">PY3</span><span class="p">:</span>
59-
<span class="kn">from</span> <span class="nn">configparser</span> <span class="kn">import</span> <span class="n">SafeConfigParser</span>
53+
<span class="kn">from</span> <span class="nn">configparser</span> <span class="k">import</span> <span class="n">SafeConfigParser</span>
6054

6155
<span class="c1">#: Location of a config file to load, if the user wants to load config values</span>
6256
<span class="c1">#: that way</span>
@@ -158,8 +152,8 @@ <h1>Source code for combtest.config</h1><div class="highlight"><pre>
158152
<span class="sd"> include a single file, or one file per e.g. IP.</span>
159153
<span class="sd"> :return: path, map of ip-&gt;path</span>
160154
<span class="sd"> &quot;&quot;&quot;</span>
161-
<span class="n">override</span> <span class="o">=</span> <span class="n">SSH_CONF</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;ssh_rsakey_override&#39;</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span>
162-
<span class="n">override_map</span> <span class="o">=</span> <span class="n">SSH_CONF</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;ssh_rsakey_map&#39;</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span>
155+
<span class="n">override</span> <span class="o">=</span> <span class="n">SSH_CONF</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;ssh_rsakey_override&#39;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
156+
<span class="n">override_map</span> <span class="o">=</span> <span class="n">SSH_CONF</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;ssh_rsakey_map&#39;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
163157

164158
<span class="k">return</span> <span class="p">(</span><span class="n">override</span><span class="p">,</span> <span class="n">override_map</span><span class="p">)</span></div>
165159

@@ -168,8 +162,8 @@ <h1>Source code for combtest.config</h1><div class="highlight"><pre>
168162
<span class="sd"> Get usernames for SSH authentication.</span>
169163
<span class="sd"> :return: username, map of ip-&gt;username</span>
170164
<span class="sd"> &quot;&quot;&quot;</span>
171-
<span class="n">override</span> <span class="o">=</span> <span class="n">SSH_CONF</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;ssh_username_override&#39;</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span>
172-
<span class="n">override_map</span> <span class="o">=</span> <span class="n">SSH_CONF</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;ssh_username_map&#39;</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span>
165+
<span class="n">override</span> <span class="o">=</span> <span class="n">SSH_CONF</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;ssh_username_override&#39;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
166+
<span class="n">override_map</span> <span class="o">=</span> <span class="n">SSH_CONF</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;ssh_username_map&#39;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
173167

174168
<span class="k">return</span> <span class="p">(</span><span class="n">override</span><span class="p">,</span> <span class="n">override_map</span><span class="p">)</span></div>
175169

@@ -178,8 +172,8 @@ <h1>Source code for combtest.config</h1><div class="highlight"><pre>
178172
<span class="sd"> Get passwords for SSH authentication.</span>
179173
<span class="sd"> :return: password, map of ip-&gt;password</span>
180174
<span class="sd"> &quot;&quot;&quot;</span>
181-
<span class="n">override</span> <span class="o">=</span> <span class="n">SSH_CONF</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;ssh_password_override&#39;</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span>
182-
<span class="n">override_map</span> <span class="o">=</span> <span class="n">SSH_CONF</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;ssh_password_map&#39;</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span>
175+
<span class="n">override</span> <span class="o">=</span> <span class="n">SSH_CONF</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;ssh_password_override&#39;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
176+
<span class="n">override_map</span> <span class="o">=</span> <span class="n">SSH_CONF</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;ssh_password_map&#39;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
183177

184178
<span class="k">return</span> <span class="p">(</span><span class="n">override</span><span class="p">,</span> <span class="n">override_map</span><span class="p">)</span></div>
185179

@@ -218,8 +212,8 @@ <h1>Source code for combtest.config</h1><div class="highlight"><pre>
218212
<span class="sd"> Get the port number where we should expect to find an rpyc service running,</span>
219213
<span class="sd"> once it is bootstrapped.</span>
220214
<span class="sd"> &quot;&quot;&quot;</span>
221-
<span class="n">port</span> <span class="o">=</span> <span class="n">WORKER_CONF_OVERRIDE</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;service_port&#39;</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span>
222-
<span class="k">if</span> <span class="n">port</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
215+
<span class="n">port</span> <span class="o">=</span> <span class="n">WORKER_CONF_OVERRIDE</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;service_port&#39;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
216+
<span class="k">if</span> <span class="n">port</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
223217
<span class="n">port</span> <span class="o">=</span> <span class="n">WORKER_CONF</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;service_port&#39;</span><span class="p">,</span> <span class="n">DEFAULT_SERVICE_PORT</span><span class="p">)</span>
224218
<span class="k">return</span> <span class="n">port</span></div>
225219

@@ -237,10 +231,43 @@ <h1>Source code for combtest.config</h1><div class="highlight"><pre>
237231
</pre></div>
238232

239233
</div>
234+
240235
</div>
241236
</div>
242237
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
243-
<div class="sphinxsidebarwrapper"><div class="relations">
238+
<div class="sphinxsidebarwrapper">
239+
<h1 class="logo"><a href="../../index.html">py-combtest</a></h1>
240+
241+
242+
243+
244+
245+
246+
247+
248+
<h3>Navigation</h3>
249+
<p class="caption"><span class="caption-text">Quick start</span></p>
250+
<ul>
251+
<li class="toctree-l1"><a class="reference internal" href="../../introduction.html">Overview</a></li>
252+
<li class="toctree-l1"><a class="reference internal" href="../../introduction.html#why-this-kind-of-testing">Why this kind of testing?</a></li>
253+
<li class="toctree-l1"><a class="reference internal" href="../../introduction.html#high-level-example">High level example</a></li>
254+
<li class="toctree-l1"><a class="reference internal" href="../../introduction.html#comparison-to-unittest-and-pytest-case-generation">Comparison to unittest and pytest case generation</a></li>
255+
<li class="toctree-l1"><a class="reference internal" href="../../examples.html">Example code</a></li>
256+
<li class="toctree-l1"><a class="reference internal" href="../../examples.html#generating-and-running-tests">Generating and Running Tests</a></li>
257+
<li class="toctree-l1"><a class="reference internal" href="../../examples.html#serial-actions">Serial Actions</a></li>
258+
<li class="toctree-l1"><a class="reference internal" href="../../examples.html#distributed-test-execution">Distributed Test Execution</a></li>
259+
<li class="toctree-l1"><a class="reference internal" href="../../examples.html#notes-on-serialization">Notes on Serialization</a></li>
260+
<li class="toctree-l1"><a class="reference internal" href="../../examples.html#logging-and-replay">Logging and Replay</a></li>
261+
<li class="toctree-l1"><a class="reference internal" href="../../examples.html#config">Config</a></li>
262+
<li class="toctree-l1"><a class="reference internal" href="../../examples.html#notes-on-scalability">Notes on Scalability</a></li>
263+
<li class="toctree-l1"><a class="reference internal" href="../../examples.html#custom-executor-bootstrapping-methods">Custom Executor Bootstrapping Methods</a></li>
264+
</ul>
265+
<p class="caption"><span class="caption-text">Reference</span></p>
266+
<ul>
267+
<li class="toctree-l1"><a class="reference internal" href="../../api.html">py-combtest API reference</a></li>
268+
</ul>
269+
270+
<div class="relations">
244271
<h3>Related Topics</h3>
245272
<ul>
246273
<li><a href="../../index.html">Documentation overview</a><ul>
@@ -251,14 +278,24 @@ <h3>Related Topics</h3>
251278
</div>
252279
<div id="searchbox" style="display: none" role="search">
253280
<h3>Quick search</h3>
281+
<div class="searchformwrapper">
254282
<form class="search" action="../../search.html" method="get">
255283
<input type="text" name="q" />
256284
<input type="submit" value="Go" />
257285
<input type="hidden" name="check_keywords" value="yes" />
258286
<input type="hidden" name="area" value="default" />
259287
</form>
288+
</div>
260289
</div>
261290
<script type="text/javascript">$('#searchbox').show(0);</script>
291+
292+
293+
294+
295+
296+
297+
298+
262299
</div>
263300
</div>
264301
<div class="clearer"></div>
@@ -267,8 +304,8 @@ <h3>Quick search</h3>
267304
&copy;2019, Matthew J. Bryan (Dell/EMC Isilon).
268305

269306
|
270-
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.4</a>
271-
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.7</a>
307+
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.8.5</a>
308+
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
272309

273310
</div>
274311

0 commit comments

Comments
 (0)