123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524 |
- <!DOCTYPE html>
- <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
- <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
- <head>
- <meta charset="utf-8">
-
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <title>Jump-start into worry free production deployments — baangt 2020.3.0.rc4 documentation</title>
-
-
-
-
-
-
- <script type="text/javascript" src="_static/js/modernizr.min.js"></script>
-
-
- <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
- <script type="text/javascript" src="_static/jquery.js"></script>
- <script type="text/javascript" src="_static/underscore.js"></script>
- <script type="text/javascript" src="_static/doctools.js"></script>
- <script type="text/javascript" src="_static/language_data.js"></script>
-
- <script type="text/javascript" src="_static/js/theme.js"></script>
-
-
- <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
- <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
- <link rel="index" title="Index" href="genindex.html" />
- <link rel="search" title="Search" href="search.html" />
- <link rel="next" title="Structure of baangt" href="Structure.html" />
- <link rel="prev" title="What is baangt" href="OverviewUsage.html" />
- </head>
- <body class="wy-body-for-nav">
-
- <div class="wy-grid-for-nav">
-
- <nav data-toggle="wy-nav-shift" class="wy-nav-side">
- <div class="wy-side-scroll">
- <div class="wy-side-nav-search" >
-
-
- <a href="index.html" class="icon icon-home"> baangt
-
-
- </a>
-
-
-
-
-
- <div role="search">
- <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
- <input type="text" name="q" placeholder="Search docs" />
- <input type="hidden" name="check_keywords" value="yes" />
- <input type="hidden" name="area" value="default" />
- </form>
- </div>
-
- </div>
- <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
-
-
-
-
-
-
- <p class="caption"><span class="caption-text">Contents:</span></p>
- <ul class="current">
- <li class="toctree-l1"><a class="reference internal" href="Installation.html"> Installation</a></li>
- <li class="toctree-l1"><a class="reference internal" href="OverviewUsage.html"> Overview</a></li>
- <li class="toctree-l1 current"><a class="current reference internal" href="#"> First Steps</a><ul>
- <li class="toctree-l2"><a class="reference internal" href="#prerequisits">Prerequisits</a></li>
- <li class="toctree-l2"><a class="reference internal" href="#let-s-dive-right-into-it">Let’s dive right into it</a><ul>
- <li class="toctree-l3"><a class="reference internal" href="#extend-the-script">Extend the Script:</a></li>
- <li class="toctree-l3"><a class="reference internal" href="#a-bit-further">A bit further</a></li>
- <li class="toctree-l3"><a class="reference internal" href="#recording-a-test-case-with-katalon-recorder">Recording a test case with Katalon Recorder</a></li>
- </ul>
- </li>
- <li class="toctree-l2"><a class="reference internal" href="#tweaking-the-result">Tweaking the result</a><ul>
- <li class="toctree-l3"><a class="reference internal" href="#more-details-on-activities">More details on Activities</a></li>
- </ul>
- </li>
- </ul>
- </li>
- <li class="toctree-l1"><a class="reference internal" href="Structure.html"> Structure</a></li>
- <li class="toctree-l1"><a class="reference internal" href="ParametersConfigFile.html"> Parameters</a></li>
- <li class="toctree-l1"><a class="reference internal" href="DataFile.html"> Data file</a></li>
- <li class="toctree-l1"><a class="reference internal" href="SimpleAPI.html"> First API Test</a></li>
- <li class="toctree-l1"><a class="reference internal" href="TestTypes.html"> Types of Tests</a></li>
- <li class="toctree-l1"><a class="reference internal" href="Developer.html"> For Developers</a></li>
- <li class="toctree-l1"><a class="reference internal" href="HistoryAndReasons.html"> History</a></li>
- <li class="toctree-l1"><a class="reference internal" href="contributors.html"> Contributions</a></li>
- <li class="toctree-l1"><a class="reference internal" href="changelog.html"> Changelog</a></li>
- <li class="toctree-l1"><a class="reference internal" href="PlannedFeatures.html"> Planned Features</a></li>
- <li class="toctree-l1"><a class="reference internal" href="BrowserDrivers.html"> Browser Drivers</a></li>
- <li class="toctree-l1"><a class="reference internal" href="articles/Articles.html"> :subheader: Articles</a></li>
- <li class="toctree-l1"><a class="reference external" href="http://www.baangt.org"> Web</a></li>
- </ul>
-
-
- </div>
- </div>
- </nav>
- <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
-
- <nav class="wy-nav-top" aria-label="top navigation">
-
- <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
- <a href="index.html">baangt</a>
-
- </nav>
- <div class="wy-nav-content">
-
- <div class="rst-content">
-
-
- <div role="navigation" aria-label="breadcrumbs navigation">
- <ul class="wy-breadcrumbs">
-
- <li><a href="index.html">Docs</a> »</li>
-
- <li>Jump-start into worry free production deployments</li>
-
-
- <li class="wy-breadcrumbs-aside">
-
-
- <a href="_sources/simpleExample.rst.txt" rel="nofollow"> View page source</a>
-
-
- </li>
-
- </ul>
-
- <hr/>
- </div>
- <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
- <div itemprop="articleBody">
-
- <div class="section" id="jump-start-into-worry-free-production-deployments">
- <h1>Jump-start into worry free production deployments<a class="headerlink" href="#jump-start-into-worry-free-production-deployments" title="Permalink to this headline">¶</a></h1>
- <p>You can try baangt right away and see how it works. It’ll take less than 5 minutes.</p>
- <div class="section" id="prerequisits">
- <h2>Prerequisits<a class="headerlink" href="#prerequisits" title="Permalink to this headline">¶</a></h2>
- <ul class="simple">
- <li><p>Chrome installed</p></li>
- <li><p>Python3 installed</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">baangt</span></code> installed (either via PIP or from the GIT-Repository at <a class="reference external" href="https://gogs.earthsquad.global/athos/baangt">https://gogs.earthsquad.global/athos/baangt</a>)</p></li>
- </ul>
- <p>If you prefer running <code class="docutils literal notranslate"><span class="pre">baangt</span></code> inside Docker, use the Dockerfile from <a class="reference external" href="https://gogs.earthsquad.global/athos/baangt-Docker">https://gogs.earthsquad.global/athos/baangt-Docker</a>.
- After downloading the repository, enter <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">build</span></code> and then <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code> in the command line.
- Once Docker is up, use SVN://localhost:5902 to connect. All features are exactly like you’d install everything on your local machine.</p>
- </div>
- <div class="section" id="let-s-dive-right-into-it">
- <h2>Let’s dive right into it<a class="headerlink" href="#let-s-dive-right-into-it" title="Permalink to this headline">¶</a></h2>
- <ul class="simple">
- <li><p>Start baangt interactive UI by typing <cite>python baangtIA.py</cite></p></li>
- <li><p>In the dropdown “Testrun” chose “SimpleTheInternet.xlsx” and click on “Execute TestRun”</p></li>
- <li><dl class="simple">
- <dt>What’s happening here is pretty similar to a real world test case:</dt><dd><ul>
- <li><p>Browser (in this case Firefox) starts up</p></li>
- <li><p>Navigate to a certain web page</p></li>
- <li><p>click on a link</p></li>
- <li><p>navigate back</p></li>
- <li><p>click on other link</p></li>
- <li><p>click on several elements of the page (e.g. buttons)</p></li>
- <li><p>write a report with summary and details about the test case. You’ll find the report in the root directory of baangt, unless you stated otherwise.</p></li>
- </ul>
- </dd>
- </dl>
- </li>
- </ul>
- <div class="section" id="extend-the-script">
- <h3>Extend the Script:<a class="headerlink" href="#extend-the-script" title="Permalink to this headline">¶</a></h3>
- <p>For this to work we recommend an XPATH or CSS-plugin for your browser.</p>
- <p>Follow these steps to modify the behaviour of the test script:</p>
- <ul class="simple">
- <li><p>Open “SimpleTheInternet.xlsx” from the baangt root directory in Excel or OpenOffice</p></li>
- <li><p>In your browser with activated XPATH or CSS-Plugin head over to <a class="reference external" href="http://the-internet.com">http://the-internet.com</a></p></li>
- <li><p>Choose one of the links, that you want to play around with and find the XPATH or CSS from your tool.</p></li>
- <li><dl class="simple">
- <dt>Copy and paste this ID in the last line of the XLSX in column C (“Locator”).</dt><dd><ul>
- <li><p>Column A (“Activity”) should be “CLICK”</p></li>
- <li><p>Column B (“LocatorType”) will be either XPATH or CSS depending on your tool</p></li>
- </ul>
- </dd>
- </dl>
- </li>
- <li><p>Save the XLSX</p></li>
- <li><p>Execute the testrun “SimpleTheInternet.xlsx” in <code class="docutils literal notranslate"><span class="pre">baangt</span></code> again.</p></li>
- <li><p>Sit back and enjoy your victory!</p></li>
- </ul>
- <div class="admonition hint">
- <p class="admonition-title">Hint</p>
- <p>If you want to be able to watch your browser executing each step, we recommend you set the parameter <code class="docutils literal notranslate"><span class="pre">slowExecution</span></code> with value <code class="docutils literal notranslate"><span class="pre">True</span></code> in Globals and re-run the test</p>
- </div>
- <div class="admonition hint">
- <p class="admonition-title">Hint</p>
- <p>If you want the browser window to stay open on errors and/or after execution, you can use parameter <code class="docutils literal notranslate"><span class="pre">dontCloseBrowser</span></code> with value <code class="docutils literal notranslate"><span class="pre">True</span></code>
- in global settings and run the test again. The browser will stop on errors or when the test run execution stopped.</p>
- </div>
- </div>
- <div class="section" id="a-bit-further">
- <h3>A bit further<a class="headerlink" href="#a-bit-further" title="Permalink to this headline">¶</a></h3>
- <p>Go ahead and try it out with your personal real-world example of a web-page, web-app or SPA, which you would like to have
- reproducable regression tests for.</p>
- <p>Of course you could basically follow the steps above, but depending on the length and complexity of the execution, you’ll
- definitely enjoy having more tools in your toolbox:</p>
- </div>
- <div class="section" id="recording-a-test-case-with-katalon-recorder">
- <h3>Recording a test case with Katalon Recorder<a class="headerlink" href="#recording-a-test-case-with-katalon-recorder" title="Permalink to this headline">¶</a></h3>
- <p>Katalon Recorder is a free browser Add-on for Chrome and Firefox. Installation is simple, just google
- <code class="docutils literal notranslate"><span class="pre">Katalon</span> <span class="pre">plugin</span> <span class="pre"><your-browser></span></code> and install the plugin. After installation of the Katalon recorder follow these steps:</p>
- <ul>
- <li><p>Start the plugin</p></li>
- <li><p>Hit the “record”-Button</p></li>
- <li><dl class="simple">
- <dt>Execute the activities you want it to record. Usually following these steps:</dt><dd><ul class="simple">
- <li><p>Open a Webpage</p></li>
- <li><p>Login (optional)</p></li>
- <li><p>Navigate to some sub-page</p></li>
- <li><p>Click buttons</p></li>
- <li><p>Enter values</p></li>
- <li><p>Download documents (optional)</p></li>
- </ul>
- </dd>
- </dl>
- </li>
- <li><p>Stop recording</p>
- <div class="admonition hint">
- <p class="admonition-title">Hint</p>
- <p>You might want to execute the test case from within Katalon Recorder to make sure everything was recorded properly.</p>
- </div>
- </li>
- <li><p>Hit the export-Button of the recorder, chose format <code class="docutils literal notranslate"><span class="pre">other</span></code></p></li>
- <li><p>Click “Export to Clipboard”</p></li>
- <li><dl class="simple">
- <dt>Switch over to <code class="docutils literal notranslate"><span class="pre">baangt</span></code> and press the button “Import KatalonRecorder”</dt><dd><ul class="simple">
- <li><p>The contents from the clipboard should be imported already and translation to <code class="docutils literal notranslate"><span class="pre">baangt</span></code> should be completed. If the clipboard was not inserted automatically, click on the button “Import Clipboard” and please drop a ticket stating your operating system incl. version and which browser you used for recording in Katalon recorder.</p></li>
- </ul>
- </dd>
- </dl>
- </li>
- <li><p>Press “Save” and choose where you want to store the resulting XLSX-File</p></li>
- </ul>
- <p><strong>That’s it. You just created you first regression test case including all parameters for it.</strong></p>
- <p>If you’re wondering which parameters these are, and how you can influence them, fear not! Open the Testcase-XLSX from
- the last step above, click on the “data”-Tab and start to enter values and lines as you please.</p>
- <p>You can always re-run Baangt after saving your Testrun-XLSX and see your progress.</p>
- <div class="admonition hint">
- <p class="admonition-title">Hint</p>
- <p>If you want to be able to watch your browser executing each step, set the parameter <code class="docutils literal notranslate"><span class="pre">slowExecution</span></code> with value <code class="docutils literal notranslate"><span class="pre">True</span></code> in Globals and re-run the test</p>
- </div>
- </div>
- </div>
- <div class="section" id="tweaking-the-result">
- <h2>Tweaking the result<a class="headerlink" href="#tweaking-the-result" title="Permalink to this headline">¶</a></h2>
- <p>You managed to have a working recording. Congratulations! Let’s learn a bit more about the structure of the created XLSX</p>
- <table class="colwidths-given docutils align-default" id="id1">
- <caption><span class="caption-text">Fields in Tab <code class="docutils literal notranslate"><span class="pre">TestStepExecution</span></code></span><a class="headerlink" href="#id1" title="Permalink to this table">¶</a></caption>
- <colgroup>
- <col style="width: 25%" />
- <col style="width: 75%" />
- </colgroup>
- <thead>
- <tr class="row-odd"><th class="head"><p>Column Name</p></th>
- <th class="head"><p>Description</p></th>
- </tr>
- </thead>
- <tbody>
- <tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">Activtity</span></code></p></td>
- <td><p>Sets the activity of this TestStep. Activities are described in more details in next chapter</p></td>
- </tr>
- <tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">LocatorType</span></code></p></td>
- <td><p>Most of the activities need a locator. We are big fans of XPATH as locatorType, due to speed and ease of use. Sooner
- or later you’ll anyway end up needing XPATH, so why not use it always when there’s no downside? If you prefer
- writing CSS-Paths then use value <code class="docutils literal notranslate"><span class="pre">CSS</span></code> for the locator. And if you are lucky enough to have unique IDs in your
- page simply use <code class="docutils literal notranslate"><span class="pre">ID</span></code>.</p></td>
- </tr>
- <tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">Locator</span></code></p></td>
- <td><p>The locator is the specification on which element <code class="docutils literal notranslate"><span class="pre">Activity</span></code> should happen. As in the value fields, you may
- use variable replacement here too, in order to replace Locators with values from the data file. For instance the
- following would work fine:
- <code class="docutils literal notranslate"><span class="pre">//*[@id($(CUSTOMERNUMBER))]</span></code> - this would create an XPATH-Statement where $(CUSTOMERNUMBER) is replaced by the
- actual value of the current test record.</p></td>
- </tr>
- <tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">Value</span></code></p></td>
- <td><p>For instance activity <code class="docutils literal notranslate"><span class="pre">SetText</span></code> requires a value (The text to send to a Web-element). You may use fixed values
- (which will rarely happen) or values from your test data source, in the simple cases the sheet <code class="docutils literal notranslate"><span class="pre">Data</span></code> .
- The column names in the sheet <code class="docutils literal notranslate"><span class="pre">data</span></code> can be used as variable names (e.g. if you created a column “Quantity” in
- your data tab, you can use <code class="docutils literal notranslate"><span class="pre">$(Quantity)</span></code> in the field value.</p></td>
- </tr>
- <tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">Comparison</span></code> and <code class="docutils literal notranslate"><span class="pre">Value2</span></code></p></td>
- <td><p>For some activities (e.g. IF) you not only need the Value-Field but also a comparison operator and a
- second field or value to compare to. Values for <code class="docutils literal notranslate"><span class="pre">comparison</span></code> are <code class="docutils literal notranslate"><span class="pre">eq</span></code> and <code class="docutils literal notranslate"><span class="pre">=</span></code>. The field <code class="docutils literal notranslate"><span class="pre">value2</span></code>
- follows the same logic as <code class="docutils literal notranslate"><span class="pre">value</span></code>.</p></td>
- </tr>
- <tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">Timeout</span></code></p></td>
- <td><p>Sometimes you might to overwrite the default timeout settings of <code class="docutils literal notranslate"><span class="pre">baangt</span></code>. Here’s your chance. Values in seconds,
- decimals are OK (<code class="docutils literal notranslate"><span class="pre">0.5</span></code> is a valid value, so is <code class="docutils literal notranslate"><span class="pre">90</span></code>).</p></td>
- </tr>
- <tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">Optional</span></code></p></td>
- <td><p>Usually when <code class="docutils literal notranslate"><span class="pre">baangt</span></code> tries to execute an activity and can’t (after timeout), it will throw an exception,
- report in the Logs and stop the current test case. If you set <code class="docutils literal notranslate"><span class="pre">optional</span></code> to <code class="docutils literal notranslate"><span class="pre">True</span></code> or <code class="docutils literal notranslate"><span class="pre">X</span></code>, <code class="docutils literal notranslate"><span class="pre">baangt</span></code>
- will continue execution of the test case, even if the activity wasn’t possible.</p></td>
- </tr>
- <tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">Release</span></code></p></td>
- <td><p>Often you’ll face situations, where you want to run a test case in several stages (e.g. DEV, Pre-Quality, Quality,
- Migration, Pre-Production, etc.) and the software version on each stage is different. A test case, that works on
- Pre-Production will not pass on Dev-System as Dev is already further developed. If you change the test case to work
- on Dev-System and you need to test a Hotfix deployment on Pre-Production, what will you do? In other test solutions
- you would “simply” copy your test case, have one version for DEV, one for Pre-Production. Do that with hundreds of
- different test cases and watch yourself drown in chaos. OR you could use <code class="docutils literal notranslate"><span class="pre">baangt</span></code> where this problem is solved.
- Software moves through the stages of your system landscape as it evolves. Use this field to conditionally execute
- different “branches” of your test cases, depending on the version on the current stage. <code class="docutils literal notranslate"><span class="pre">Release</span></code> can be any
- string value. You can add “> ” “< ” and “= ” as the first 2 characters to signal to <code class="docutils literal notranslate"><span class="pre">baangt</span></code> to only execute
- the step when current release is greater than, lower than or exactly equal to the value afterwards, for instance</p>
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">></span> <span class="mf">2019.05</span>
- </pre></div>
- </div>
- <p>will run the line only, if the Version is <code class="docutils literal notranslate"><span class="pre">2019.05a</span></code> or <code class="docutils literal notranslate"><span class="pre">2019.06</span></code>. We are aware, that your version numbers might
- follow different nomenclature, so we made it very easy to subclass the corresponding logic.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <div class="section" id="more-details-on-activities">
- <h3>More details on Activities<a class="headerlink" href="#more-details-on-activities" title="Permalink to this headline">¶</a></h3>
- <blockquote>
- <div><ul class="simple">
- <li><p>GoToURL</p></li>
- <li><p>click</p></li>
- <li><p>setText</p></li>
- <li><p>SetTextIF</p></li>
- <li><p>clickIF</p></li>
- <li><p>goBack</p></li>
- <li><p>If</p></li>
- <li><p>EndIf</p></li>
- <li><p>Pause</p></li>
- <li><p>Assert</p></li>
- <li><p>address_create</p></li>
- </ul>
- </div></blockquote>
- <table class="colwidths-given docutils align-default" id="id2">
- <caption><span class="caption-text">Details of activities</span><a class="headerlink" href="#id2" title="Permalink to this table">¶</a></caption>
- <colgroup>
- <col style="width: 25%" />
- <col style="width: 75%" />
- </colgroup>
- <thead>
- <tr class="row-odd"><th class="head"><p>Activity</p></th>
- <th class="head"><p>Description</p></th>
- </tr>
- </thead>
- <tbody>
- <tr class="row-even"><td><p>GoToURL</p></td>
- <td><p>Navigate to the given URL. Column <code class="docutils literal notranslate"><span class="pre">Value</span></code> must provide the URL. You might want to use variables in your URL-String,
- for instance your URL might look like this <code class="docutils literal notranslate"><span class="pre">https://$(STAGE).earthsquad.global/</span></code>. It will be replaced
- during runtime of the test data with the value of <code class="docutils literal notranslate"><span class="pre">STAGE</span></code> from either Global settings or settings in the
- <code class="docutils literal notranslate"><span class="pre">testCaseSequence</span></code>.</p></td>
- </tr>
- <tr class="row-odd"><td><p>click</p></td>
- <td><p>Will click on the object specified by the <code class="docutils literal notranslate"><span class="pre">locator</span></code>.</p></td>
- </tr>
- <tr class="row-even"><td><p>clickIF</p></td>
- <td><p>Will click on the object specified by the locator IF the field in testDataDict, that you enter in Column <code class="docutils literal notranslate"><span class="pre">value</span></code>
- has a value. This small and simple extension can save you hours and hours of work in maintenance of testcases.
- Imagine you have 10 checkboxes, that in various combinations provide different test results, and you have to test
- all possible combinations. Using one column in your datafile for each checkbox and the <code class="docutils literal notranslate"><span class="pre">clickif</span></code>, you can create
- your testCases in minutes instead of hours or days. Imagine 50 checkboxes - with <code class="docutils literal notranslate"><span class="pre">baangt</span></code> your effort is still
- just minutes.</p></td>
- </tr>
- <tr class="row-odd"><td><p>setText</p></td>
- <td><p>Write the text given in column <code class="docutils literal notranslate"><span class="pre">value</span></code> to the element specified by <code class="docutils literal notranslate"><span class="pre">locator</span></code>. Only rarely will you have fixed
- values. Usually you’ll assign columns of the test data using variable replacement (e.g. <code class="docutils literal notranslate"><span class="pre">$(POSTCODE)</span></code> to set the
- text from column <code class="docutils literal notranslate"><span class="pre">POSTCODE</span></code> from the datafile into the destination element.</p></td>
- </tr>
- <tr class="row-even"><td><p>setTextIF</p></td>
- <td><p>Same as SetText, but will only do something in cases where there is a value in the datafile. Similarly to clickIF
- this little helper functionality can help you save hours and hours in creation and maintenance of rocksolid and
- bulletproof test cases.</p></td>
- </tr>
- <tr class="row-odd"><td><p>goBack</p></td>
- <td><p>Trigger the “back”-Button of the browser.</p></td>
- </tr>
- <tr class="row-even"><td><p>If/Endif</p></td>
- <td><p>The block between IF and ENDIF is only executed when the condition evaluated by <code class="docutils literal notranslate"><span class="pre">value|comparator|value2</span></code> is
- true, for instance:</p>
- <blockquote>
- <div><p>$(POSTCODE) = 7040</p>
- <p>$(YEAR2DATE) > $(YEARTOMONTH)</p>
- </div></blockquote>
- <p>Another use of the If-Statement is with <code class="docutils literal notranslate"><span class="pre">LocatorType</span></code> and <code class="docutils literal notranslate"><span class="pre">Locator</span></code> and comparison. This can be used when you
- want conditional execution of a larger block of statements depending on an element present or not present.</p>
- </td>
- </tr>
- <tr class="row-odd"><td><p>assert</p></td>
- <td><p>Will retrieve value of element specified by <code class="docutils literal notranslate"><span class="pre">locator</span></code> and compare with reference value from <code class="docutils literal notranslate"><span class="pre">value</span></code>.</p></td>
- </tr>
- <tr class="row-even"><td><p>pause</p></td>
- <td><p>Will pause for the number of secons in <code class="docutils literal notranslate"><span class="pre">value</span></code>. Valid numbers are float, e.g. 2, 0.2, 0.1, 25</p></td>
- </tr>
- <tr class="row-odd"><td><p>iban</p></td>
- <td><p>Will create a random IBAN account number. <code class="docutils literal notranslate"><span class="pre">value</span> <span class="pre">2</span></code> is the destination field of the test case structure. If you
- don’t provide a field name (not necessarily one that exists in the input file. Can be any field name!) nothing will
- happen. If you provide input parameters in column <code class="docutils literal notranslate"><span class="pre">value</span></code> (<code class="docutils literal notranslate"><span class="pre">SWIFT</span></code> and/or <code class="docutils literal notranslate"><span class="pre">COUNTRY</span></code>) the IBAN will be created for that bank-code
- and/or country.</p></td>
- </tr>
- <tr class="row-even"><td><p>address_create</p></td>
- <td><p>provide an easy and easily extendable way to generate address data for a test case
- The following fields variable are stored in testcaseDataDict:</p>
- <p>CountryCode
- PostalCode
- CityName
- StreetName
- HouseNumber
- AdditionalData1
- AdditionalData2</p>
- <dl class="simple">
- <dt><cite>value</cite> optional</dt><dd><p>Default field-value: {‘HouseNumber’: ‘6’, ‘AdditionalData1’: ‘Near MahavirChowk’, ‘AdditionalData2’: ‘Opposite St. Marish Church’, ‘StreetName’: ‘GoreGaon’, ‘CityName’: ‘Ambala’, ‘PostalCode’: ‘160055’, ‘CountryCode’: ‘India’}</p>
- </dd>
- </dl>
- <p>These fields can be used as filter criteria in field value.
- Example value= <cite>{CountryCode:CY, PostlCode: 7}</cite>.</p>
- <p>Resulted field-value :{‘HouseNumber’: ‘6’, ‘AdditionalData1’: ‘Near MahavirChowk’, ‘AdditionalData2’: ‘Opposite St. Marish Church’, ‘StreetName’: ‘GoreGaon’, ‘CityName’: ‘Ambala’, ‘PostalCode’: ‘7’, ‘CountryCode’: ‘CY’}</p>
- <p><cite>value2</cite> optional
- If a prefix was povided in field Value2, the fieldnames will be concatenated with this prefix,
- e.g.if value2=`PremiumPayer_`, then the resulting field for CountryCode in testDataDict would become PremiumPayer_CountryCode.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
-
- </div>
- <footer>
-
- <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
-
- <a href="Structure.html" class="btn btn-neutral float-right" title="Structure of baangt" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
-
-
- <a href="OverviewUsage.html" class="btn btn-neutral float-left" title="What is baangt" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
-
- </div>
-
- <hr/>
- <div role="contentinfo">
- <p>
- © Copyright 2020, Bernhard Buhl
- </p>
- </div>
- 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>.
- </footer>
- </div>
- </div>
- </section>
- </div>
-
- <script type="text/javascript">
- jQuery(function () {
- SphinxRtdTheme.Navigation.enable(true);
- });
- </script>
-
-
-
-
- </body>
- </html>
|