OverviewUsage.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. <!DOCTYPE html>
  2. <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
  3. <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
  4. <head>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>What is baangt &mdash; baangt 1.1.1 documentation</title>
  8. <script type="text/javascript" src="_static/js/modernizr.min.js"></script>
  9. <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
  10. <script type="text/javascript" src="_static/jquery.js"></script>
  11. <script type="text/javascript" src="_static/underscore.js"></script>
  12. <script type="text/javascript" src="_static/doctools.js"></script>
  13. <script type="text/javascript" src="_static/language_data.js"></script>
  14. <script type="text/javascript" src="_static/js/theme.js"></script>
  15. <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  16. <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  17. <link rel="stylesheet" href="_static/theme_overrides.css" type="text/css" />
  18. <link rel="index" title="Index" href="genindex.html" />
  19. <link rel="search" title="Search" href="search.html" />
  20. <link rel="next" title="Jump-start into worry free production deployments" href="simpleExample.html" />
  21. <link rel="prev" title="Installation" href="Installation.html" />
  22. </head>
  23. <body class="wy-body-for-nav">
  24. <div class="wy-grid-for-nav">
  25. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  26. <div class="wy-side-scroll">
  27. <div class="wy-side-nav-search" >
  28. <a href="index.html" class="icon icon-home"> baangt
  29. </a>
  30. <div role="search">
  31. <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
  32. <input type="text" name="q" placeholder="Search docs" />
  33. <input type="hidden" name="check_keywords" value="yes" />
  34. <input type="hidden" name="area" value="default" />
  35. </form>
  36. </div>
  37. </div>
  38. <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  39. <p class="caption"><span class="caption-text">Contents:</span></p>
  40. <ul class="current">
  41. <li class="toctree-l1"><a class="reference internal" href="Installation.html"> Installation</a></li>
  42. <li class="toctree-l1 current"><a class="current reference internal" href="#"> Overview</a><ul>
  43. <li class="toctree-l2"><a class="reference internal" href="#the-fastest-simplest-way-to-record-test-cases">The fastest, simplest way to record test cases</a></li>
  44. <li class="toctree-l2"><a class="reference internal" href="#more-powerful-and-still-simple-ways">More powerful and still simple ways:</a><ul>
  45. <li class="toctree-l3"><a class="reference internal" href="#hey-why-not-do-everything-in-excel">Hey, why not do everything in Excel?</a></li>
  46. </ul>
  47. </li>
  48. <li class="toctree-l2"><a class="reference internal" href="#subclassing-for-multiply-used-functionality">Subclassing for multiply used functionality</a></li>
  49. <li class="toctree-l2"><a class="reference internal" href="#baangtdb-for-flexible-powerful-enterprise-grade-test-automation"><code class="docutils literal notranslate"><span class="pre">BaangtDB</span></code> for flexible, powerful enterprise grade test automation</a></li>
  50. <li class="toctree-l2"><a class="reference internal" href="#to-sum-it-up">To sum it up</a></li>
  51. </ul>
  52. </li>
  53. <li class="toctree-l1"><a class="reference internal" href="simpleExample.html"> First Steps</a></li>
  54. <li class="toctree-l1"><a class="reference internal" href="Structure.html"> Structure</a></li>
  55. <li class="toctree-l1"><a class="reference internal" href="ParametersConfigFile.html"> Parameters</a></li>
  56. <li class="toctree-l1"><a class="reference internal" href="SimpleAPI.html"> First API Test</a></li>
  57. <li class="toctree-l1"><a class="reference internal" href="TestTypes.html"> Types of Tests</a></li>
  58. <li class="toctree-l1"><a class="reference internal" href="DataFile.html"> Data file</a></li>
  59. <li class="toctree-l1"><a class="reference internal" href="SaveResults2Database.html"> Results in Database</a></li>
  60. <li class="toctree-l1"><a class="reference internal" href="HistoryAndReasons.html"> History</a></li>
  61. <li class="toctree-l1"><a class="reference internal" href="contributors.html"> Contributions</a></li>
  62. <li class="toctree-l1"><a class="reference internal" href="changelog.html"> Changelog</a></li>
  63. <li class="toctree-l1"><a class="reference internal" href="PlannedFeatures.html"> Planned Features</a></li>
  64. <li class="toctree-l1"><a class="reference internal" href="BrowserDrivers.html"> Browser Drivers</a></li>
  65. <li class="toctree-l1"><a class="reference internal" href="Variables.html"> Variables</a></li>
  66. <li class="toctree-l1"><a class="reference internal" href="SendStatistics.html"> Results</a></li>
  67. <li class="toctree-l1"><a class="reference internal" href="Datagenerator.html">DataGenerator</a></li>
  68. <li class="toctree-l1"><a class="reference internal" href="Datagenerator.html#input-file">Input File</a></li>
  69. <li class="toctree-l1"><a class="reference internal" href="Datagenerator.html#data-type">Data Type</a></li>
  70. <li class="toctree-l1"><a class="reference internal" href="Datagenerator.html#all-data-types-format">All Data Types Format</a></li>
  71. <li class="toctree-l1"><a class="reference internal" href="Developer.html"> For Developers</a></li>
  72. <li class="toctree-l1"><a class="reference internal" href="baangt-Plugin.html">What is a baangt-plugin</a></li>
  73. <li class="toctree-l1"><a class="reference internal" href="baangt-Plugin.html#how-to-make-a-baangt-plugin">how to make a baangt-plugin</a></li>
  74. <li class="toctree-l1"><a class="reference internal" href="baangt-Plugin.html#how-the-baangt-plugin-work">how the baangt-plugin work</a></li>
  75. <li class="toctree-l1"><a class="reference internal" href="baangt-Plugin.html#how-to-replace-the-existing-plugin-by-your-own-one">how to replace the existing plugin by your own one</a></li>
  76. <li class="toctree-l1"><a class="reference internal" href="articles/Articles.html"> :subheader: Articles</a></li>
  77. <li class="toctree-l1"><a class="reference external" href="http://www.baangt.org"> Web</a></li>
  78. </ul>
  79. <p class="caption"><span class="caption-text">Autodocs:</span></p>
  80. <ul>
  81. <li class="toctree-l1"><a class="reference internal" href="docs/baangt.base.html">Autodocs</a></li>
  82. <li class="toctree-l1"><a class="reference internal" href="docs/modules.html">Modules</a></li>
  83. </ul>
  84. </div>
  85. </div>
  86. </nav>
  87. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
  88. <nav class="wy-nav-top" aria-label="top navigation">
  89. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  90. <a href="index.html">baangt</a>
  91. </nav>
  92. <div class="wy-nav-content">
  93. <div class="rst-content">
  94. <div role="navigation" aria-label="breadcrumbs navigation">
  95. <ul class="wy-breadcrumbs">
  96. <li><a href="index.html">Docs</a> &raquo;</li>
  97. <li>What is <code class="docutils literal notranslate"><span class="pre">baangt</span></code></li>
  98. <li class="wy-breadcrumbs-aside">
  99. <a href="_sources/OverviewUsage.rst.txt" rel="nofollow"> View page source</a>
  100. </li>
  101. </ul>
  102. <hr/>
  103. </div>
  104. <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
  105. <div itemprop="articleBody">
  106. <div class="section" id="what-is-baangt">
  107. <h1>What is <code class="docutils literal notranslate"><span class="pre">baangt</span></code><a class="headerlink" href="#what-is-baangt" title="Permalink to this headline">¶</a></h1>
  108. <p>Testing software has always been a challenging field, and it’s not getting easier or simpler, as overall complexity in corporate
  109. and other applications skyrockets. Release cycles in larger corporations are often long because of inefficient regression
  110. tests. Also costs of software updates, upgrades and forward development are heavily impacted by too little test coverage.</p>
  111. <p><strong>To stop praying when you release to production, you need to start serious testing!</strong></p>
  112. <p>With <code class="docutils literal notranslate"><span class="pre">baangt</span></code> you have one <em>open source</em> solution for all your test stages and needs. Be it Frontend with Webbrowser, API,
  113. graphQL, SOAP, oData or chromium related App-Tests. You’ll use one toolset, one database per stage and one reporting to
  114. see at any given moment, how your stages and applications are doing and if it’s safe to release the current state of one
  115. stage to the next.</p>
  116. <blockquote>
  117. <div><p><code class="docutils literal notranslate"><span class="pre">baangt</span></code> is optimized to be super easy to start, and flexible when your demand grows.</p>
  118. </div></blockquote>
  119. <div class="section" id="the-fastest-simplest-way-to-record-test-cases">
  120. <h2>The fastest, simplest way to record test cases<a class="headerlink" href="#the-fastest-simplest-way-to-record-test-cases" title="Permalink to this headline">¶</a></h2>
  121. <p>If your requirements are pretty basic, you’d start using <code class="docutils literal notranslate"><span class="pre">baangt</span></code> with a simple Excel-Sheet as source of Testcase definition and
  122. Testdata definition. This is super fast, very easy even for end-users but has limited flexibility, even though it comes packed
  123. with all features of the higher end solutions like reporting, fault tolerance, screenshots in case of errors and much more.</p>
  124. </div>
  125. <div class="section" id="more-powerful-and-still-simple-ways">
  126. <h2>More powerful and still simple ways:<a class="headerlink" href="#more-powerful-and-still-simple-ways" title="Permalink to this headline">¶</a></h2>
  127. <p>As your requirements grow you want to have Testcase and testrun definition separately (e.g. you want to execute the same
  128. test cases on different stages of your system landscape (Pre-Quality, Final-Quality, Dev) and not for every heartbeat test
  129. you would want to run through your 1000s of records of test data. Maybe you will have a SQL-Query in your Excel based data, which changes
  130. data records dynamically or per stage or per version, that you want to test for.</p>
  131. <p>Things are not so simple in this stage, but still simple enough for technically versed business department to run high
  132. quality tests on all stages by themselves.</p>
  133. <p>Even after the point, where you need technicians to integrate baangt with your CD/CI-Pipeline`s build-management tools,
  134. the maintenance of data and test sequence can be done without ANY other tools (except Excel or OpenOffice) easily by the
  135. people who know best what to test: Your business department.</p>
  136. <div class="section" id="hey-why-not-do-everything-in-excel">
  137. <h3>Hey, why not do everything in Excel?<a class="headerlink" href="#hey-why-not-do-everything-in-excel" title="Permalink to this headline">¶</a></h3>
  138. <p>There is one serious drawback from this flexibility: it’s <strong>change</strong>. Of course you started with 1 sheet, but later had some additional
  139. requirements and simply added a second sheet to cover those without changing the definitions of the first excel sheet.
  140. You’re still happy as you need both behaviours tested (imagine one test set for regional customers and another test set
  141. for customers from other countries). Great. Everything works.</p>
  142. <p>After having some serious problems in production and fixing
  143. those defects, you decide to write a testcase to mimic a certain user behavior (e.g. navigating back and forth multiple
  144. times, deleting and re-adding objects from a shopping cart, etc.). The basic test sequence would still be the same as in
  145. the other two cases, but for a specific card you’ll need changes. Simple. You copy one of the original sheets and adjust
  146. accordingly. You immediately sleep better because now also those cases are part of your growing regression test set. Wonderful.
  147. You continue like this for 2 months, end up with 2 or 3 datafiles and 20 test case definitions. That’s not uncommon. What is also
  148. not uncommon is “<strong>Change</strong>”. For more direct communication with the endusers the AUT (Application under test) get’s enriched
  149. with a Sentry-Popup. Wonderful idea. But wait… It’s not so great after all, because now you have to update 20 test case
  150. definitions with a way to deal with the new popup. Imagine corporate environments where we have many thousands or many tens of
  151. thousands tests.</p>
  152. </div>
  153. </div>
  154. <div class="section" id="subclassing-for-multiply-used-functionality">
  155. <h2>Subclassing for multiply used functionality<a class="headerlink" href="#subclassing-for-multiply-used-functionality" title="Permalink to this headline">¶</a></h2>
  156. <p>The existing classes <code class="docutils literal notranslate"><span class="pre">baangt.TestCase.TestCaseMaster</span></code> and <code class="docutils literal notranslate"><span class="pre">baangt.TestStep.TestStepMaster</span></code> can easily be subclassed
  157. and enriched with static functionality - even when you use the Excel version of <code class="docutils literal notranslate"><span class="pre">baangt.py</span></code>. Yes, you’ll need to know
  158. some basics of powerful Python Language and most probably an IDE.</p>
  159. <p>An example could look as simple like this:</p>
  160. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">baangt.TestStep</span> <span class="kn">import</span> <span class="n">TestStepMaster</span>
  161. <span class="k">class</span> <span class="nc">myTestStep</span><span class="p">(</span><span class="n">TestStepMaster</span><span class="p">):</span>
  162. <span class="k">def</span> <span class="nf">execute</span><span class="p">():</span>
  163. <span class="bp">self</span><span class="o">.</span><span class="n">driver</span><span class="o">.</span><span class="n">goToURL</span><span class="p">(</span><span class="s2">&quot;http://www.google.com&quot;</span><span class="p">)</span>
  164. <span class="bp">self</span><span class="o">.</span><span class="n">driver</span><span class="o">.</span><span class="n">findByAndSetText</span><span class="p">(</span><span class="n">xpath</span><span class="o">=</span><span class="s1">&#39;//input[@type=&quot;text&quot;]&#39;</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="s1">&#39;baangt&#39;</span><span class="p">)</span>
  165. <span class="bp">self</span><span class="o">.</span><span class="n">driver</span><span class="o">.</span><span class="n">findByAndClick</span><span class="p">(</span><span class="n">xpath</span><span class="o">=</span><span class="s1">&#39;(//input[contains(@type,&#39;</span><span class="n">submit</span><span class="s1">&#39;)])[3]&#39;</span><span class="p">)</span>
  166. </pre></div>
  167. </div>
  168. <p>That’s it. All the rest is taken care of by <code class="docutils literal notranslate"><span class="pre">baangt</span></code>. You’ll also receive a nice export file showing timing information
  169. for your TestCase.</p>
  170. <p>You can subclass any other functionality, that doesn’t fully fit your needs (IBAN-Generation, Browser-Handling, Timing)
  171. and also create your own Assertion-classes (for instance if you need to receive data from a Host-System or
  172. RFC/SOAP-Connection or any other source that is not natively supported by <code class="docutils literal notranslate"><span class="pre">baangt.py</span></code>). Of course you’d only
  173. re-implement methods that you need to enrich, and consume everything else from the framework.</p>
  174. <p>Please consider creating pull-requests if you think some of your custom implemented functionality could be useful for
  175. others.</p>
  176. </div>
  177. <div class="section" id="baangtdb-for-flexible-powerful-enterprise-grade-test-automation">
  178. <h2><code class="docutils literal notranslate"><span class="pre">BaangtDB</span></code> for flexible, powerful enterprise grade test automation<a class="headerlink" href="#baangtdb-for-flexible-powerful-enterprise-grade-test-automation" title="Permalink to this headline">¶</a></h2>
  179. <p>Enter the next stage: <code class="docutils literal notranslate"><span class="pre">baangtDB</span></code>. <code class="docutils literal notranslate"><span class="pre">baangtDB</span></code> does much more than just replace Excel as input and sequence source. BaangtDB
  180. provides modularization of your test cases. In the above example you’d maintain the Sentry-Popup exactly ONCE for all your
  181. test cases, where it applies.</p>
  182. <p>If you’re in a really large corporate environment, you’ll start facing problems with the XLS-Based solution, as corporate
  183. governance, compliance, regulations and so on will sooner or later make it difficult to use the software in this way.
  184. Even if you use <code class="docutils literal notranslate"><span class="pre">git</span></code> you experience problems with different versions of the Excel-Sheets - depending on your setup of course.</p>
  185. <p>But still no need invest into expensive, licensed, closed source, proprietary solutions and depend on their good will.
  186. Run <code class="docutils literal notranslate"><span class="pre">baangtDB</span></code> (for testdata and testcase sequences) in a docker container, on premises or in the cloud and have the full
  187. flexibility plus comfort for free.</p>
  188. </div>
  189. <div class="section" id="to-sum-it-up">
  190. <h2>To sum it up<a class="headerlink" href="#to-sum-it-up" title="Permalink to this headline">¶</a></h2>
  191. <p>There are multiple ways to use the open source testing framework <code class="docutils literal notranslate"><span class="pre">baangt</span></code>. Each with it’s up- and downsides.</p>
  192. <table class="colwidths-given docutils align-default" id="id1">
  193. <caption><span class="caption-text">Possibilities to use <code class="docutils literal notranslate"><span class="pre">baangt</span></code></span><a class="headerlink" href="#id1" title="Permalink to this table">¶</a></caption>
  194. <colgroup>
  195. <col style="width: 100%" />
  196. </colgroup>
  197. <tbody>
  198. <tr class="row-odd"><td><p><strong>XLSX-Simple format</strong></p></td>
  199. </tr>
  200. <tr class="row-even"><td><p>to get you started the single Excel-Sheet holds test sequence and data. Fully functional, full reporting on test execution.</p></td>
  201. </tr>
  202. <tr class="row-odd"><td><p><strong>XLSX-full format</strong></p></td>
  203. </tr>
  204. <tr class="row-even"><td><p>XLSX format: more comples test run, test sequence, test case, test steps as part of testcase definition file. Separate data file.</p></td>
  205. </tr>
  206. <tr class="row-odd"><td><p><strong>baangtDB</strong></p></td>
  207. </tr>
  208. <tr class="row-even"><td><p>Complexity of XLSX-Format, but simpler maintenance in corporate environments. More and better ways to structure and reuse testcase sequences.</p></td>
  209. </tr>
  210. <tr class="row-odd"><td><p><strong>Cloud</strong></p></td>
  211. </tr>
  212. <tr class="row-even"><td><p>Same as database</p></td>
  213. </tr>
  214. <tr class="row-odd"><td><p><strong>Hosted</strong></p></td>
  215. </tr>
  216. <tr class="row-even"><td><p>Same as database</p></td>
  217. </tr>
  218. </tbody>
  219. </table>
  220. </div>
  221. </div>
  222. </div>
  223. </div>
  224. <footer>
  225. <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
  226. <a href="simpleExample.html" class="btn btn-neutral float-right" title="Jump-start into worry free production deployments" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
  227. <a href="Installation.html" class="btn btn-neutral float-left" title="Installation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
  228. </div>
  229. <hr/>
  230. <div role="contentinfo">
  231. <p>
  232. &copy; Copyright 2020, Bernhard Buhl
  233. </p>
  234. </div>
  235. Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
  236. </footer>
  237. </div>
  238. </div>
  239. </section>
  240. </div>
  241. <script type="text/javascript">
  242. jQuery(function () {
  243. SphinxRtdTheme.Navigation.enable(true);
  244. });
  245. </script>
  246. </body>
  247. </html>