SendStatistics.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  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>SendStatistics &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="DataGenerator" href="Datagenerator.html" />
  21. <link rel="prev" title="Dealing with variables" href="Variables.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"><a class="reference internal" href="OverviewUsage.html"> Overview</a></li>
  43. <li class="toctree-l1"><a class="reference internal" href="simpleExample.html"> First Steps</a></li>
  44. <li class="toctree-l1"><a class="reference internal" href="Structure.html"> Structure</a></li>
  45. <li class="toctree-l1"><a class="reference internal" href="ParametersConfigFile.html"> Parameters</a></li>
  46. <li class="toctree-l1"><a class="reference internal" href="SimpleAPI.html"> First API Test</a></li>
  47. <li class="toctree-l1"><a class="reference internal" href="TestTypes.html"> Types of Tests</a></li>
  48. <li class="toctree-l1"><a class="reference internal" href="DataFile.html"> Data file</a></li>
  49. <li class="toctree-l1"><a class="reference internal" href="SaveResults2Database.html"> Results in Database</a></li>
  50. <li class="toctree-l1"><a class="reference internal" href="HistoryAndReasons.html"> History</a></li>
  51. <li class="toctree-l1"><a class="reference internal" href="contributors.html"> Contributions</a></li>
  52. <li class="toctree-l1"><a class="reference internal" href="changelog.html"> Changelog</a></li>
  53. <li class="toctree-l1"><a class="reference internal" href="PlannedFeatures.html"> Planned Features</a></li>
  54. <li class="toctree-l1"><a class="reference internal" href="BrowserDrivers.html"> Browser Drivers</a></li>
  55. <li class="toctree-l1"><a class="reference internal" href="Variables.html"> Variables</a></li>
  56. <li class="toctree-l1 current"><a class="current reference internal" href="#"> Results</a><ul>
  57. <li class="toctree-l2"><a class="reference internal" href="#email">Email</a></li>
  58. <li class="toctree-l2"><a class="reference internal" href="#ms-teams">Ms Teams</a></li>
  59. <li class="toctree-l2"><a class="reference internal" href="#slack">Slack</a></li>
  60. <li class="toctree-l2"><a class="reference internal" href="#telegram">Telegram</a></li>
  61. <li class="toctree-l2"><a class="reference internal" href="#configuring-baangt">Configuring Baangt</a></li>
  62. </ul>
  63. </li>
  64. <li class="toctree-l1"><a class="reference internal" href="Datagenerator.html">DataGenerator</a></li>
  65. <li class="toctree-l1"><a class="reference internal" href="Datagenerator.html#input-file">Input File</a></li>
  66. <li class="toctree-l1"><a class="reference internal" href="Datagenerator.html#data-type">Data Type</a></li>
  67. <li class="toctree-l1"><a class="reference internal" href="Datagenerator.html#all-data-types-format">All Data Types Format</a></li>
  68. <li class="toctree-l1"><a class="reference internal" href="Developer.html"> For Developers</a></li>
  69. <li class="toctree-l1"><a class="reference internal" href="baangt-Plugin.html">What is a baangt-plugin</a></li>
  70. <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>
  71. <li class="toctree-l1"><a class="reference internal" href="baangt-Plugin.html#how-the-baangt-plugin-work">how the baangt-plugin work</a></li>
  72. <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>
  73. <li class="toctree-l1"><a class="reference internal" href="articles/Articles.html"> :subheader: Articles</a></li>
  74. <li class="toctree-l1"><a class="reference external" href="http://www.baangt.org"> Web</a></li>
  75. </ul>
  76. <p class="caption"><span class="caption-text">Autodocs:</span></p>
  77. <ul>
  78. <li class="toctree-l1"><a class="reference internal" href="docs/baangt.base.html">Autodocs</a></li>
  79. <li class="toctree-l1"><a class="reference internal" href="docs/modules.html">Modules</a></li>
  80. </ul>
  81. </div>
  82. </div>
  83. </nav>
  84. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
  85. <nav class="wy-nav-top" aria-label="top navigation">
  86. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  87. <a href="index.html">baangt</a>
  88. </nav>
  89. <div class="wy-nav-content">
  90. <div class="rst-content">
  91. <div role="navigation" aria-label="breadcrumbs navigation">
  92. <ul class="wy-breadcrumbs">
  93. <li><a href="index.html">Docs</a> &raquo;</li>
  94. <li>SendStatistics</li>
  95. <li class="wy-breadcrumbs-aside">
  96. <a href="_sources/SendStatistics.rst.txt" rel="nofollow"> View page source</a>
  97. </li>
  98. </ul>
  99. <hr/>
  100. </div>
  101. <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
  102. <div itemprop="articleBody">
  103. <div class="section" id="sendstatistics">
  104. <h1>SendStatistics<a class="headerlink" href="#sendstatistics" title="Permalink to this headline">¶</a></h1>
  105. <p>While running tests on <code class="docutils literal notranslate"><span class="pre">baangt</span></code> we might need to share the report to multiple persons in a team. To do this one might
  106. have to be present in front of screen and wait for completion of the test. But to overcome this issue we have added a
  107. functionality in <code class="docutils literal notranslate"><span class="pre">baangt</span></code> to send the reports in various platform automatically, thus you don’t need to waste your
  108. time in front of screen just for waiting of completion, our program will take care of that.</p>
  109. <p>Their are 4 different services where we can send test reports. They are:</p>
  110. <ol class="arabic simple">
  111. <li><p>Email</p></li>
  112. <li><p>Ms Teams</p></li>
  113. <li><p>Slack</p></li>
  114. <li><p>Telegram</p></li>
  115. </ol>
  116. <p>Lets first discuss things we need to use this services in our program one by one.</p>
  117. <p><strong>Note :- If you don’t need to use any service from the following you just skip that part</strong></p>
  118. <div class="section" id="email">
  119. <h2>Email<a class="headerlink" href="#email" title="Permalink to this headline">¶</a></h2>
  120. <p>We don’t need anything(except recipients email ids).</p>
  121. </div>
  122. <div class="section" id="ms-teams">
  123. <h2>Ms Teams<a class="headerlink" href="#ms-teams" title="Permalink to this headline">¶</a></h2>
  124. <p>We need webhook url of Ms Teams channel where we need to send reports. If you need any help in getting webhook url you can
  125. refer to this link:- <a class="reference external" href="https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using#setting-up-a-custom-incoming-webhook">https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using#setting-up-a-custom-incoming-webhook</a></p>
  126. </div>
  127. <div class="section" id="slack">
  128. <h2>Slack<a class="headerlink" href="#slack" title="Permalink to this headline">¶</a></h2>
  129. <p>We need incoming webhook url for the app which has permission to post message in your group. For further assistance you
  130. can refer to “<cite>Set up Incoming Webhooks</cite>” section of <a class="reference external" href="https://slack.com/intl/en-in/help/articles/115005265063-Incoming-webhooks-for-Slack">https://slack.com/intl/en-in/help/articles/115005265063-Incoming-webhooks-for-Slack</a></p>
  131. </div>
  132. <div class="section" id="telegram">
  133. <h2>Telegram<a class="headerlink" href="#telegram" title="Permalink to this headline">¶</a></h2>
  134. <p>To send message in telegram channel we need channel username and a bot’s HTTP API token who has administrator privilage
  135. in your channel.</p>
  136. <p>First, to get username of the channel you can simply go to info section of your channel where you will find invite link
  137. which will look like <cite>t.me/your_channel_username</cite> here your_channel_username is what we need.</p>
  138. <p>Now to get HTTP API token of bot, first we need to create a bot. To create a new bot you need to search for <cite>&#64;botfather</cite> in
  139. telegram. If you are first time user of BotFather then you will see an introduction and a start button in the bottom. If
  140. you don’t see start button but seeing a text area in bottom you can just type <code class="docutils literal notranslate"><span class="pre">/start</span></code> then to create a new bot you
  141. have to select or type <code class="docutils literal notranslate"><span class="pre">/newbot</span></code> after that it will ask a name for your bot. You can name it anything but I for best
  142. practice we will use <cite>ChannelName bot</cite> after that it will ask a username for your bot which must be unique and the
  143. username must end with <cite>bot</cite> word so we can use <cite>ChannelName_bot</cite> after sending this you should get a congratulations
  144. message which means your bot is created. In this congratulation message you will get <cite>HTTP API access token</cite> we will
  145. need this further in our program.</p>
  146. <p>Our next step is to add the bot in our channel as administrator. Please visit this link for further assistance :-
  147. <a class="reference external" href="https://stackoverflow.com/a/33497769/8784795">https://stackoverflow.com/a/33497769/8784795</a></p>
  148. </div>
  149. <div class="section" id="configuring-baangt">
  150. <h2>Configuring Baangt<a class="headerlink" href="#configuring-baangt" title="Permalink to this headline">¶</a></h2>
  151. <p>Once we have all the necessary things we just need to add them in <code class="docutils literal notranslate"><span class="pre">main.ini</span></code> which must be inside <code class="docutils literal notranslate"><span class="pre">ini</span></code> folder.
  152. If you have used windows installer to setup <code class="docutils literal notranslate"><span class="pre">baangt</span></code> then it must be inside <cite>C:/Users/{username}/baangt</cite> directory,
  153. else it will be in the root directory of baangt. Once you find the <code class="docutils literal notranslate"><span class="pre">ini</span></code> folder their must be a main.ini file inside
  154. it. If it is not their you can make one. Just create a new file name <cite>main</cite> and extension <cite>ini</cite> which will look like
  155. <code class="docutils literal notranslate"><span class="pre">main.ini</span></code>. Then you can edit it via any text editor. It should look like.</p>
  156. <div class="line-block">
  157. <div class="line">[Default]</div>
  158. <div class="line">sendmailto = &lt;email&gt;</div>
  159. <div class="line">notificationwithattachment = &lt;True or False&gt;</div>
  160. <div class="line">mswebhook = &lt;MsTeam channel webhook url&gt;</div>
  161. <div class="line">slackwebhook = &lt;Slack App webhook url&gt;</div>
  162. <div class="line">telegrambot = &lt;telegram bot access token&gt;</div>
  163. <div class="line">telegramchannel = &lt;telegram channel name&gt;</div>
  164. </div>
  165. <p>Configurations of mail:- <code class="docutils literal notranslate"><span class="pre">sendmailto</span></code> and <code class="docutils literal notranslate"><span class="pre">notificationwithattachment</span></code> are the settings for email. <code class="docutils literal notranslate"><span class="pre">sendmailto</span></code>
  166. can contain single recipients or multiple recipients which would look like.
  167. <strong>sendmailto = example1&#64;xyz.com, example2&#64;xyz.com, example3&#64;xyz.com</strong> inshort they should be comma seperated.
  168. <strong>notificationwithattachment</strong> should be True if you want to send xlsx result file as attachment in the mail else it
  169. should be False.</p>
  170. <p>Configuration of MsTeam:- <code class="docutils literal notranslate"><span class="pre">mswebhook</span></code> takes single or multiple(comma seperated as above) webhook url and will send
  171. report in them.</p>
  172. <p>Configuration of Slack:- <code class="docutils literal notranslate"><span class="pre">slackwebhook</span></code> takes single or multiple(comma seperated as above) webhook url and will send
  173. report in them.</p>
  174. <p>Configurations of Telegram:- <code class="docutils literal notranslate"><span class="pre">telegrambot</span></code> and <code class="docutils literal notranslate"><span class="pre">telegramchannel</span></code> are the settings for telegram. <code class="docutils literal notranslate"><span class="pre">telegrambot</span></code> will
  175. take single value containing API token of bot. <code class="docutils literal notranslate"><span class="pre">telegramchannel</span></code> may contain single or multiple(comma seperated as
  176. above) username of channels. Make sure that all the channels have this bot as administrator.</p>
  177. <p><strong>Note:- If you don’t need to use any of the service out of these four, you can just leave their settings empty</strong></p>
  178. </div>
  179. </div>
  180. </div>
  181. </div>
  182. <footer>
  183. <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
  184. <a href="Datagenerator.html" class="btn btn-neutral float-right" title="DataGenerator" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
  185. <a href="Variables.html" class="btn btn-neutral float-left" title="Dealing with variables" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
  186. </div>
  187. <hr/>
  188. <div role="contentinfo">
  189. <p>
  190. &copy; Copyright 2020, Bernhard Buhl
  191. </p>
  192. </div>
  193. 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>.
  194. </footer>
  195. </div>
  196. </div>
  197. </section>
  198. </div>
  199. <script type="text/javascript">
  200. jQuery(function () {
  201. SphinxRtdTheme.Navigation.enable(true);
  202. });
  203. </script>
  204. </body>
  205. </html>