Package: gauge-web-app-steps
gauge-web-app-stepsA Python module, that provides re-usable steps for testing web applications with theGaugeframework.DescriptionThis is an extensible and flexible test-automation library forGauge. It enables users with and without programming knowledge to create end-to-end test scenarios inMarkdownsyntax. Developers can still easily extend their test scenarios with custom code. Selenium and Appium are used to simulate user interaction with the browser. A wide range of platforms and browsers are supported. Tests can also be executed on devices and emulators in theSauceLabscloud.Gauge Step OverviewFind the documentation on all Gauge steps of this project in the overview:Gauge Step OverviewQuick StartThis is a library for the Gauge framework, so Gauge+Python must be installed first.Install Python >= 3.10 on your platform and make it available in the $PATHInstallGaugeandcreate a test project with PythonIt is useful to understand the basic workings of Gauge first. Thedocumentationis excellent.Installthis moduleFind out the path to this module after installation:echo$(python-msite--user-site)/gauge_web_app_stepsAdd that path to the propertySTEP_IMPL_DIRinside the test project fileenv/default/python.properties. Paths to multiple modules are comma separated.Example on a Mac:STEP_IMPL_DIR = /Users/<user>/Library/Python/3.10/lib/python/site-packages/gauge_web_app_steps, step_implReload Visual Studio CodeWrite a new scenario inspecs/example.spec. VSC offersauto-completionInstallationThis module can be installed from source:cdpath/to/gauge-web-app-steps
pipinstall--user.Or the latest package can be downloaded and installed fromPyPi:pipinstallgauge-web-app-steps--user--upgradeDevelopmentWhen coding on this project, unit tests can be executed like this:TEST_SKIP_IT=1python-munittestdiscover-v-stests/-p'test_*.py'Contributions are welcome.TroubleshootingSome known inter-operability issues can be found on thetroubleshootingpage. If things don't work immediately, a solution might already be documented there.ConfigurationThe Configuration follows theGauge configurationapproach.
A lot of behaviour, including the browsers and devices to use for the tests, can be determined with properties.Configuration OverviewExpressions in ParametersProperty PlaceholdersStep parameters allow the use of placeholders, that can be defined in the Gauge environment properties files. Some steps also allow to set a placeholder value manually. Property keys act as placeholders, they are defined like${key}. They will be replaced by its value if such a property key/value pair exists in anyenv/*/*.propertiesfile or within the execution scope.Mathematical ExpressionsMathematical expressions can also be evaluated. For example:#{5 + 5 * 5}is evaluated to30.It is possible to combine the two features. Placeholder substitution takes place before mathematical expression evaluation.Functional ExpressionsFunctional expressions will generate a result during step execution. There are 2 expressions: One will generate a UUID, and the other will yield the current date and time:!{uuid},!{time},!{time:%Y-%m-%d}. The time format is optional, if omitted it will be use ISO format. The time format pattern is described in thePython language documentation.Expression ExamplesNote that the property expressions start with$, mathematical expressions with#, and functional expressions with!.* Open "${homepage_url}/home"* Assert "id" = "sum" equals "#{5 + 6}"* Assert "id" = "sum" equals "#{$addend + 5 * 5}"* Type "!{uuid}"* Type "!{time}"* Type "!{time:%Y-%m-%d}"The property "homepage_url" can be defined inenv/default/test.propertieslike this:homepage_url =https://my-app.netIt is also possible to define a property in a step:* Save placeholder "addend" = "5"MaintainersMaintainers