diff -r 3fc8dfeb6ebe -r b99e7fd55fd3 src/eric7/Documentation/Source/eric7.Testing.Interfaces.TestExecutorBase.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/eric7/Documentation/Source/eric7.Testing.Interfaces.TestExecutorBase.html Thu Jul 07 11:23:56 2022 +0200 @@ -0,0 +1,520 @@ +<!DOCTYPE html> +<html><head> +<title>eric7.Testing.Interfaces.TestExecutorBase</title> +<meta charset="UTF-8"> +<link rel="stylesheet" href="styles.css"> +</head> +<body> +<a NAME="top" ID="top"></a> +<h1>eric7.Testing.Interfaces.TestExecutorBase</h1> + +<p> +Module implementing the executor base class for the various testing frameworks +and supporting classes. +</p> +<h3>Global Attributes</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Classes</h3> + +<table> + +<tr> +<td><a href="#TestConfig">TestConfig</a></td> +<td>Class containing the test run configuration.</td> +</tr> +<tr> +<td><a href="#TestExecutorBase">TestExecutorBase</a></td> +<td>Base class for test framework specific implementations.</td> +</tr> +<tr> +<td><a href="#TestResult">TestResult</a></td> +<td>Class containing the test result data.</td> +</tr> +<tr> +<td><a href="#TestResultCategory">TestResultCategory</a></td> +<td>Class defining the supported result categories.</td> +</tr> +</table> +<h3>Functions</h3> + +<table> +<tr><td>None</td></tr> +</table> +<hr /> +<hr /> +<a NAME="TestConfig" ID="TestConfig"></a> +<h2>TestConfig</h2> + +<p> + Class containing the test run configuration. +</p> +<h3>Derived from</h3> +None +<h3>Class Attributes</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Class Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Static Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> + +<div align="right"><a href="#top">Up</a></div> +<hr /> +<hr /> +<a NAME="TestExecutorBase" ID="TestExecutorBase"></a> +<h2>TestExecutorBase</h2> + +<p> + Base class for test framework specific implementations. +</p> +<h3>Signals</h3> +<dl> + +<dt>collectError(list of tuple of (str, str)</dt> +<dd> +) emitted when errors + are encountered during test collection. Tuple elements are the + test name and the error message. +</dd> +<dt>collected(list of tuple of (str, str, str)</dt> +<dd> +) emitted after all tests + have been collected. Tuple elements are the test id, the test name and + a short description of the test. +</dd> +<dt>coverageDataSaved(str)</dt> +<dd> +emitted after the coverage data was saved. + The element is the absolute path of the coverage data file. +</dd> +<dt>startTest(tuple of (str, str, str)</dt> +<dd> +emitted before tests are run. + Tuple elements are test id, test name and short description. +</dd> +<dt>stop()</dt> +<dd> +emitted when the test process is being stopped. +</dd> +<dt>testFinished(list, str)</dt> +<dd> +emitted when the test has finished. + The elements are the list of test results and the captured output + of the test worker (if any). +</dd> +<dt>testResult(TestResult)</dt> +<dd> +emitted when a test result is ready +</dd> +<dt>testRunAboutToBeStarted()</dt> +<dd> +emitted just before the test run will + be started. +</dd> +<dt>testRunFinished(int, float)</dt> +<dd> +emitted when the test run has finished. + The elements are the number of tests run and the duration in seconds +</dd> +</dl> +<h3>Derived from</h3> +QObject +<h3>Class Attributes</h3> + +<table> +<tr><td>module</td></tr><tr><td>name</td></tr><tr><td>runner</td></tr> +</table> +<h3>Class Methods</h3> + +<table> + +<tr> +<td><a href="#TestExecutorBase.isInstalled">isInstalled</a></td> +<td>Class method to check whether a test framework is installed.</td> +</tr> +</table> +<h3>Methods</h3> + +<table> + +<tr> +<td><a href="#TestExecutorBase.__init__">TestExecutorBase</a></td> +<td>Constructor</td> +</tr> +<tr> +<td><a href="#TestExecutorBase._prepareProcess">_prepareProcess</a></td> +<td>Protected method to prepare a process object to be started.</td> +</tr> +<tr> +<td><a href="#TestExecutorBase.createArguments">createArguments</a></td> +<td>Public method to create the arguments needed to start the test process.</td> +</tr> +<tr> +<td><a href="#TestExecutorBase.finished">finished</a></td> +<td>Public method handling the unit test process been finished.</td> +</tr> +<tr> +<td><a href="#TestExecutorBase.getVersions">getVersions</a></td> +<td>Public method to get the test framework version and version information of its installed plugins.</td> +</tr> +<tr> +<td><a href="#TestExecutorBase.hasCoverage">hasCoverage</a></td> +<td>Public method to get the test framework version and version information of its installed plugins.</td> +</tr> +<tr> +<td><a href="#TestExecutorBase.readAllOutput">readAllOutput</a></td> +<td>Public method to read all output of the test process.</td> +</tr> +<tr> +<td><a href="#TestExecutorBase.start">start</a></td> +<td>Public method to start the testing process.</td> +</tr> +<tr> +<td><a href="#TestExecutorBase.stopIfRunning">stopIfRunning</a></td> +<td>Public method to stop the testing process, if it is running.</td> +</tr> +</table> +<h3>Static Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> + +<a NAME="TestExecutorBase.isInstalled" ID="TestExecutorBase.isInstalled"></a> +<h4>TestExecutorBase.isInstalled (class method)</h4> +<b>isInstalled</b>(<i>interpreter</i>) + +<p> + Class method to check whether a test framework is installed. +</p> +<p> + The test is performed by checking, if a module loader can found. +</p> +<dl> + +<dt><i>interpreter</i> (str)</dt> +<dd> +interpreter to be used for the test +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +flag indicating the test framework module is installed +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +bool +</dd> +</dl> +<a NAME="TestExecutorBase.__init__" ID="TestExecutorBase.__init__"></a> +<h4>TestExecutorBase (Constructor)</h4> +<b>TestExecutorBase</b>(<i>testWidget</i>) + +<p> + Constructor +</p> +<dl> + +<dt><i>testWidget</i> (TestingWidget)</dt> +<dd> +reference to the unit test widget +</dd> +</dl> +<a NAME="TestExecutorBase._prepareProcess" ID="TestExecutorBase._prepareProcess"></a> +<h4>TestExecutorBase._prepareProcess</h4> +<b>_prepareProcess</b>(<i>workDir, pythonpath</i>) + +<p> + Protected method to prepare a process object to be started. +</p> +<dl> + +<dt><i>workDir</i> (str)</dt> +<dd> +working directory +</dd> +<dt><i>pythonpath</i> (list of str)</dt> +<dd> +list of directories to be added to the Python path +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +prepared process object +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +QProcess +</dd> +</dl> +<a NAME="TestExecutorBase.createArguments" ID="TestExecutorBase.createArguments"></a> +<h4>TestExecutorBase.createArguments</h4> +<b>createArguments</b>(<i>config</i>) + +<p> + Public method to create the arguments needed to start the test process. +</p> +<dl> + +<dt><i>config</i> (TestConfig)</dt> +<dd> +configuration for the test execution +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +list of process arguments +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of str +</dd> +</dl> +<dl> + +<dt>Raises <b>NotImplementedError</b>:</dt> +<dd> +this method needs to be implemented by + derived classes +</dd> +</dl> +<a NAME="TestExecutorBase.finished" ID="TestExecutorBase.finished"></a> +<h4>TestExecutorBase.finished</h4> +<b>finished</b>(<i></i>) + +<p> + Public method handling the unit test process been finished. +</p> +<p> + This method should read the results (if necessary) and emit the signal + testFinished. +</p> +<dl> + +<dt>Raises <b>NotImplementedError</b>:</dt> +<dd> +this method needs to be implemented by + derived classes +</dd> +</dl> +<a NAME="TestExecutorBase.getVersions" ID="TestExecutorBase.getVersions"></a> +<h4>TestExecutorBase.getVersions</h4> +<b>getVersions</b>(<i>interpreter</i>) + +<p> + Public method to get the test framework version and version information + of its installed plugins. +</p> +<dl> + +<dt><i>interpreter</i> (str)</dt> +<dd> +interpreter to be used for the test +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +dictionary containing the framework name and version and the + list of available plugins with name and version each +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +dict +</dd> +</dl> +<dl> + +<dt>Raises <b>NotImplementedError</b>:</dt> +<dd> +this method needs to be implemented by + derived classes +</dd> +</dl> +<a NAME="TestExecutorBase.hasCoverage" ID="TestExecutorBase.hasCoverage"></a> +<h4>TestExecutorBase.hasCoverage</h4> +<b>hasCoverage</b>(<i>interpreter</i>) + +<p> + Public method to get the test framework version and version information + of its installed plugins. +</p> +<dl> + +<dt><i>interpreter</i> (str)</dt> +<dd> +interpreter to be used for the test +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +flag indicating the availability of coverage functionality +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +bool +</dd> +</dl> +<dl> + +<dt>Raises <b>NotImplementedError</b>:</dt> +<dd> +this method needs to be implemented by + derived classes +</dd> +</dl> +<a NAME="TestExecutorBase.readAllOutput" ID="TestExecutorBase.readAllOutput"></a> +<h4>TestExecutorBase.readAllOutput</h4> +<b>readAllOutput</b>(<i>process=None</i>) + +<p> + Public method to read all output of the test process. +</p> +<dl> + +<dt><i>process</i> (QProcess)</dt> +<dd> +reference to the process object +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +test process output +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +str +</dd> +</dl> +<a NAME="TestExecutorBase.start" ID="TestExecutorBase.start"></a> +<h4>TestExecutorBase.start</h4> +<b>start</b>(<i>config, pythonpath</i>) + +<p> + Public method to start the testing process. +</p> +<dl> + +<dt><i>config</i> (TestConfig)</dt> +<dd> +configuration for the test execution +</dd> +<dt><i>pythonpath</i> (list of str)</dt> +<dd> +list of directories to be added to the Python path +</dd> +</dl> +<dl> + +<dt>Raises <b>RuntimeError</b>:</dt> +<dd> +raised if the the testing process did not start +</dd> +</dl> +<a NAME="TestExecutorBase.stopIfRunning" ID="TestExecutorBase.stopIfRunning"></a> +<h4>TestExecutorBase.stopIfRunning</h4> +<b>stopIfRunning</b>(<i></i>) + +<p> + Public method to stop the testing process, if it is running. +</p> +<div align="right"><a href="#top">Up</a></div> +<hr /> +<hr /> +<a NAME="TestResult" ID="TestResult"></a> +<h2>TestResult</h2> + +<p> + Class containing the test result data. +</p> +<h3>Derived from</h3> +None +<h3>Class Attributes</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Class Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Static Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> + +<div align="right"><a href="#top">Up</a></div> +<hr /> +<hr /> +<a NAME="TestResultCategory" ID="TestResultCategory"></a> +<h2>TestResultCategory</h2> + +<p> + Class defining the supported result categories. +</p> +<h3>Derived from</h3> +IntEnum +<h3>Class Attributes</h3> + +<table> +<tr><td>FAIL</td></tr><tr><td>OK</td></tr><tr><td>PENDING</td></tr><tr><td>RUNNING</td></tr><tr><td>SKIP</td></tr> +</table> +<h3>Class Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Static Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> + +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file