This project aims to create a Domain-Specific Language for functional tests.
For installation of this project in development mode, you require JetBrains MPS. Follow the steps below:
- Clone the repository
git clone git@github.com:yuryalencar/teasy-language-mobile.git
- Install MPS IDE
Download and install by https://www.jetbrains.com/mps/
- 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.
- MPS BaseLanguage
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.
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:
- Define test configuration through a "Configuration" file, this file is unique by project.
- Define your components into a "Components" file, you need to create all components in the same file.
- Initialize the Hooks by creating a "Hooks" file, you need only create a Hooks file and do not need to write anything.
- Define a page of your application actions using the "Page" files, you can create the number of files you want to organize your pages.
- 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.
- 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.
To generate your automated tests you need to:
- Click in the sandbox folder
- Click on the right button of the mouse (sandbox folder) and select "Make build model"
- Click on the right button of the mouse (sandbox folder) and select "Preview Generated Text"
- 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
- Your project code will be in the source_gen folder, you can copy the folder to any folder of your computer
- Run your tests, and enjoy :)
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. |
Contributions are what make the open-source community an incredible place to learn, inspire, and create. Any contribution you make will be much appreciated.
- Make a project Fork
- Create a Branch for your feature (
git checkout -b feature/amazing-feature
) - Insert your changes (
git add .
) - Make a commit with your changes (
git commit -m 'feat(<teasy-filename>): Inserting an Amazing Feature !
) - Push the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Distributed under the MIT license. See LICENSE
for more information.
Yury Alencar - Github - yuryalencar19@gmail.com