This demo project contains sample tests in four syntax frameworks:

* RSpec  (Ruby)
* Cucumber (Ruby)
* Mocha  (Node.js)
* Pytest (Python)

Normally, you just use one test syntax framework, like the ones on https://github.com/testwisely/agiletravel-ui-tests. For this demo project, we include 4, not just to show off TestWise's multi-framework support, more importantly, to let users compare the test scripts in different syntax and languages conveniently. For example, comparing spec/flight_spec.rb, mocha/02_flight_spec.js and pytest/2_flight_test.py, you will find the actual test scripts are very similar, thanks to a good design.

All test scripts are in standard Selenium WebDriver syntax, utlizing the common test deisgn best practices: reusable helper functions and page object models, no other dependencies. 

FAQ
---

1. The test does not run on my machine? 

Make you have set up test automation execution on your machine, i.e., you can run test from command line. 

rspec spec\01_login_spec.rb
pytest test\1_login_test.py
cucumber features\01_login.feature
mocha mocha\01_login-spec.js

(the only exception is TestWise Ruby edition, which already includes a distribution of Ruby with RSpec and Cucjmber).

Once it is done, set the 'Execution Path' under Testwise Settings's 'Exeuction' tab.  For example, this is a setting on a typical our machine (supporting multiple frameworks).

C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Ruby26-x64\bin;C:\Users\CIO\AppData\Local\Programs\Python\Python38\Scripts\;C:\Users\CIO\AppData\Local\Programs\Python\Python38;;C:\Program Files\nodejs\;C:\Users\CIO\AppData\Local\Microsoft\WindowsApps;C:\Users\CIO\AppData\Roaming\npm;

Also, don't get putting your browser drivers (e.g. chromedriver) in one of the above PATH as well.

2. Can TestWise support other frameworks, such as Capybara (Ruby) or Jasmine (Node.js)?

TestWise supports all official scripting languages of Selenium WebDriver: Ruby, Python and JavaScript.  All syntax frameworks in these 3 languages can work in TestWise, at the moment, four supported frameworks are RSpec, Cucumber, Pytest and Mocha.

If you request support of a new framework (in those 3 languages), contact our support. 

3. Do you have examples in raw Selenium WebDriver?

See another demo project 'demo-raw'.

4. I like your test design, where can I find more information?

The design is using the common pattern: Project Object Model (https://www.selenium.dev/documentation/en/guidelines_and_recommendations/page_object_models/). For more on the test design, check out Zhimin Zhan's book 'Practical Web Test Automation' (https://leanpub.com/practical-web-test-automation).

5. Which syntax framework (and language) do you recommend? 

RSpec.
