OverviewUsage.rst.txt 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. ============================
  2. What is ``baangt``
  3. ============================
  4. Testing software has always been a challenging field and it's not getting easier or simpler as overall complexity in corporate
  5. and other applications skyrockets. Release cycles in larger corporations are often long because of inefficient regression
  6. tests. Also costs of software updates, upgrades and forward development is heavily impacted by too little test coverage.
  7. **To stop praying when you release to production you need to start serious testing!**
  8. With ``baangt`` you've one *open source* solution for all your test stages and needs. Be it Frontend with Webbrowser, API,
  9. graphQL, SOAP, oData or chromium related App-Tests. You'll use one toolset, one database per stage and one reporting to
  10. see at any given moment, how your stages and applications are doing and if it's safe to release the current state of one
  11. stage to the next.
  12. ``baangt`` is optimized to be super easy to start and flexible when your demand grows.
  13. The fastest, simplest way to record test cases
  14. ----------------------------------------------
  15. If your requirements are pretty basic you'd start using ``baangt`` with a simple Excel-Sheet as source of Testcase definition and
  16. Testdata definition. This is super fast, very easy even for endusers but has limited flexibility, even though it comes packed
  17. with all features of the higher end solutions like reporting, fault tolerance, screenshots in case of errors and much more.
  18. Still simple and more powerful ways:
  19. ------------------------------------
  20. As your requirements grow you'd have Testcase and testrun definition separately (e.g. you want to execute the same
  21. test cases on different stages of your system landscape (Pre-Quality, Final-Quality, Dev) and not for every heartbeat test
  22. you'd want to run through your 1000s of test data. Maybe you'll have a SQL-Query in your Excel based data, which changes
  23. data records dynamically or per stage or per version, that you want to test for. Things are not so simple in this stage,
  24. but still simple enough for technically versed business department to run high quality tests on all stages by themselves.
  25. Even after the point, where you need technicians to integrate baangt with your CD/CI-Pipeline`s buildmanagement tools,
  26. the maintenance of data and test sequence can be done without ANY other tools (except Excel or OpenOffice) easily by the
  27. people who know best what to test: Your business department.
  28. Hey, why not do everything in Excel?
  29. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  30. There is one serious drawback from this flexibilty: it's **change**. Of course you started with 1 sheet, but later had some additional
  31. requirements and simply added a second sheet to cover those whithout changing the definitions of the first excel sheet.
  32. You're still happy as you need both behaviours tested (imagine one test set for regional customers and another test set
  33. for customers from other countries). Great. Everything works. After having some serious problems in production and fixing
  34. those defects you decide to write a testcase to mimic a certain user behaviour (e.g. navigating back and forth multiple
  35. times, deleting and re-adding objects from a shopping chart, etc.). The basic test sequence would be still the same as in
  36. the other two cases, but for a specific card you'll need changes. Simple. You copy one of the original sheets and adjust
  37. accordingly. You immediately sleep better because now also those cases are part of your growing regression test set. Wonderful.
  38. You continue like this for 2 months, end up with 2 or 3 datafiles and 20 test case definitions. That's not uncommon. Also
  39. not uncommon is "**Change**". For more direct communication with the endusers the AUT (Application under test) get's enriched
  40. with a Sentry-Popup. Wonderful idea. But wait... It's not so great after all, because now you have to update 20 test case
  41. definitions with a way to deal with the new popup. Imagine corporate environments where we have many 1.000 or many 10.000
  42. tests.
  43. Subclassing for multiply used functionality
  44. -------------------------------------------
  45. The existing classes ``baangt.TestCase.TestCaseMaster`` and ``baangt.TestStep.TestStepMaster`` can easily be subclassed
  46. and enriched with static functionality - even when you use the Excel version of ``baangt.py``. Yes, you'll need to know
  47. some basics of powerful Python Language and most probably an IDE.
  48. An example could look as simple like this:
  49. ::
  50. from baangt.TestStep import TestStepMaster
  51. class myTestStep(TestStepMaster):
  52. def execute():
  53. self.driver.goToURL("http://www.google.com")
  54. self.driver.findByAndSetText(xpath='//input[@type="text"]', value='baangt')
  55. self.driver.findByAndClick(xpath='(//input[contains(@type,'submit')])[3]')
  56. That's it. All the rest is taken care of by ``baangt``. You'll also receive a nice export file showing timing information
  57. for your TestCase.
  58. You can subclass any other functionality, that doesn't fully fit your needs (IBAN-Generation, Browser-Handling, Timing)
  59. and also create your own Assertion-classes (for instance if you need to receive data from a Host-System or
  60. RFC/SOAP-Connection or any other source that is not natively supported by ``baangt.py``). Of course you'd only
  61. re-implement methods, that you need to enrich and consume everything else from the framework.
  62. Please consider creating pull-requests if you think some of your custom implemented functionality could be useful for
  63. others.
  64. ``BaangtDB`` for flexible, powerful enterprise grade test automation
  65. --------------------------------------------------------------------
  66. Enter the next stage: ``baangtDB``. ``baangtDB`` does much more than just replace Excel as input and sequence source. BaangtDB
  67. provides modularization of your test cases. In the above example you'd maintain the Sentry-Popup exactly ONCE for all your
  68. test cases, where it applies.
  69. Also if you're in a really large corporate environment, you'll start facing problems with the XLS-Based solution as corporate
  70. governance, compliance, regulations and so on will sooner or later make it difficult to use the software in this way. Also
  71. even if you use ``git`` you experience problems with different versions of the Excel-Sheets - depending on your setup of course.
  72. But still no need invest into expensive, licensed, closed source, proprietary solutions and depend on their good will.
  73. Run ``baangtDB`` (for testdata and testcase sequences) in a docker container on premises or in Cloud and have the full flexibility plus
  74. comfort for free.
  75. To sum it up
  76. ------------
  77. There are multiple ways to use the open source testing framework ``baangt``. Each with it's up- and downsides.
  78. .. list-table:: Possibilities to use ``baangt``
  79. :widths: 100
  80. * - **XLSX-Simple format**
  81. * - to get you started the single Excel-Sheet holds test sequence and data. Fully functional, full reporting on test execution.
  82. * - **XLSX-full format**
  83. * - XLSX format: more comples test run, test sequence, test case, test steps as part of testcase definition file. Separate data file.
  84. * - **baangtDB**
  85. * - Complexity of XLSX-Format, but simpler maintenance in corporate environments. More and better ways to structure and reuse testcase sequences.
  86. * - **Cloud**
  87. * - Same as database
  88. * - **Hosted**
  89. * - Same as database