/teasy-language-mobile

Language to implement functional tests for mobile applications

Primary LanguageJetBrains MPSMIT LicenseMIT


Teasy Mobile: The Domain Specific Language for Functional Tests.

Table of Contents

About Project

This project aims to create a Domain-Specific Language for functional tests.

Starting

Installation

For installation of this project in development mode, you require JetBrains MPS. Follow the steps below:

  1. Clone the repository

git clone git@github.com:yuryalencar/teasy-language-mobile.git

  1. Install MPS IDE

Download and install by https://www.jetbrains.com/mps/

  1. Open the teasy-language-mobile project using the MPS IDE

Ps.: You need to have Simulator, Robot Framework, Appium, and Appium Inspector configured in your computer to run your tests.

Language used

  • MPS BaseLanguage

How To Use

The version installed by installation steps is a development version. However is so functional to develop automated tests. When you open the project using the MPS IDE, you will see the Teasy.sandbox, this space is only for you to develop your automated tests, practice, and have fun. Use the best practices below to develop your tests.

Best Practices

The Teasy Mobile language helps you to develop automated software tests using the PageObjects design pattern. To do it we recommend you follow the steps below:

  1. Define test configuration through a "Configuration" file, this file is unique by project.
  2. Define your components into a "Components" file, you need to create all components in the same file.
  3. Initialize the Hooks by creating a "Hooks" file, you need only create a Hooks file and do not need to write anything.
  4. Define a page of your application actions using the "Page" files, you can create the number of files you want to organize your pages.
  5. Register all pages done in the "PageRegisterConfig", this file is unique by project and this file is important to automated tests using only pages done to run.
  6. Define your test flows by the "Flows" file, you can create the number of files you want to organize your tests.

ps.: is recommended to create folders to organize your test code. To do it, you need to create a "Set Virtual Package" in the MPS using the right button of the mouse.

Generating my automated tests

To generate your automated tests you need to:

  1. Click in the sandbox folder
  2. Click on the right button of the mouse (sandbox folder) and select "Make build model"
  3. Click on the right button of the mouse (sandbox folder) and select "Preview Generated Text"
  4. Now you can see all files are generated by MPS IDE, but to run your tests you need to go to the respective folder:

[your-project-path]/languages/Teasy/sandbox

  1. Your project code will be in the source_gen folder, you can copy the folder to any folder of your computer
  2. Run your tests, and enjoy :)

File Types

Below is a list of the files contained in that language and their description.

Filename Description
Configuration Basics configuration to run the scripts generated by Teasy Mobile Language.
PageRegister Used in automation for import created pages.
Components Components present in system pages, used for interaction with the application.
Hooks Hooks are setups and teardowns of your test, used start and finish tests.
Page Page of the system and actions can be run, used for run tests.
Flows This file contains flows of the use in application, file with sequence to execute.

Contributing

Contributions are what make the open-source community an incredible place to learn, inspire, and create. Any contribution you make will be much appreciated.

  1. Make a project Fork
  2. Create a Branch for your feature (git checkout -b feature/amazing-feature)
  3. Insert your changes (git add .)
  4. Make a commit with your changes (git commit -m 'feat(<teasy-filename>): Inserting an Amazing Feature !)
  5. Push the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

License

Distributed under the MIT license. See LICENSE for more information.

Contact

Yury Alencar - Github - yuryalencar19@gmail.com