Skip to content

Commit

Permalink
Merge pull request #13 from osandadeshan/1.3.2
Browse files Browse the repository at this point in the history
1.3.2
  • Loading branch information
osandadeshan authored Jan 17, 2021
2 parents f377e4f + 256197e commit b6dabe9
Show file tree
Hide file tree
Showing 179 changed files with 5,755 additions and 8,200 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: IntelliAPI CI with Maven

on:
push:
branches:
- '**'
pull_request:
branches:
- '**'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Add Gauge's GPG key
run: sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv-keys 023EDB0B
- name: Add Gauge to the repository list
run: echo deb https://dl.bintray.com/gauge/gauge-deb stable main | sudo tee -a /etc/apt/sources.list
- name: Install Gauge
run: sudo apt-get update && sudo apt-get install gauge
- name: Install Gauge-Java plugin
run: gauge install java
- name: Run pre-requisites tests with Maven
run: mvn test-compile gauge:execute -DspecsDir="specs" -Dtags="pre_requisites" -Denv="qa"
- name: Run regression tests with Maven
run: mvn test-compile gauge:execute -DspecsDir="specs" -Dtags="regression" -Denv="qa" -DinParallel=true
73 changes: 35 additions & 38 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,49 @@
# MaxSoft IntelliAPI
<br />

## Introduction
The main reason for developing this framework is to provide an easy way for Technical QA, Developer or Non-technical QA to perform API testing in an easy manner.
<br /><br />

## Technologies/Frameworks used
## Advantages
- Ability to implement automated tests for an API within few minutes.
- Codeless API automation.
- Ability to validate backend databases.
- Tests can be designed even by a non- technical person.
- Human readable tests in business language and markdown syntax.
- Generation of an executable document.
- Generate a HTML report with test details for every test execution.
- Parallel execution.
- Live execution report.
- Automated emails for test execution summary with graphical representations.

## Technologies/Frameworks Used
- Java
- Gauge Framework
- Rest Assured
- Apache POI
- Junit
- Apache Maven
<br />

## Supported Platforms
- Windows
- Linux
- Mac OS
<br />

## Supported Languages
- Java
<br />

## Advantages
- Generation of an executable document.
- Human readable tests, business language and Mark-down syntax.
- Tests can be designed even by a non- technical person.
- Ability to validate backend databases.
- Generate a HTML report with test details for every test execution.
- Parallel execution.
- Live execution report.
- Automated emails for test execution summary with graphical representations.
<br />
## Design Diagram
![image](https://user-images.githubusercontent.com/9147189/104115454-a1ed7d00-5335-11eb-9e23-0f75137068af.png)

## Pre Requisites
1. Java
2. Maven
<br />

## How to Install Gauge Core

## Installing Gauge Core
**On Windows**
1. Install Chocolatey by executing the following command. \
` @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString(https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"`
1. Install Chocolatey by executing the following command in an administrator command prompt. \
`@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"`

2. Install Gauge by executing the following command. \
2. Install Gauge by executing the following command in an administrator command prompt. \
`choco install gauge`

**On MacOS**
Expand All @@ -66,9 +63,8 @@ The main reason for developing this framework is to provide an easy way for Tech
3. Finally, install Gauge using these commands. \
`sudo apt-get update` \
`sudo apt-get install gauge`
<br />

## How to Install Gauge Plugins
## Installing Gauge Plugins
1. Open Command Prompt and execute following commands. \
`gauge install java` \
`gauge install html-report` \
Expand All @@ -93,7 +89,15 @@ The main reason for developing this framework is to provide an easy way for Tech
spectacle (<version number>)
xml-report (<version number>)
```
<br />

## Tested Versions
| OS | Java Version | Maven Version | Gauge Version | Gauge Java Version |
| ------------------------- | -------------- | ------------- | ------------ | ------------------- |
| Windows 10 Enterprise | 1.8.0_181 | 3.6.1 | 1.1.6 | 0.7.13 |
| Windows 10 Enterprise | 1.8.0_131 | 3.5.0 | 1.1.7 | 0.7.13 |
| Windows 10 | 1.8.0_271 | 3.6.3 | 1.1.6 | 0.7.13 |
| Ubuntu 18.04 | 1.8 | 3.6.3 | 1.1.7 | 0.7.13 |
| MacOS Catalina v10.15.7 | 1.8.0_275 | 3.6.3 | 1.1.7 | 0.7.13 |

## MaxSoft IntelliAPI Tutorials
1. [MaxSoft IntelliAPI](https://medium.com/@osanda.deshan/maxsoft-ata-framework-for-api-test-automation-9cffd25a0b15 "MaxSoft — IntelliAPI")
Expand All @@ -103,35 +107,28 @@ The main reason for developing this framework is to provide an easy way for Tech
5. [How to use MaxSoft IntelliAPI for API Test Automation? — Tutorial 3](https://medium.com/@osanda.deshan/how-to-use-maxsoft-ata-framework-for-api-test-automation-tutorial-3-160f81e404f1 "How to use MaxSoft IntelliAPI for API Test Automation? — Tutorial 3")
6. [How to use MaxSoft IntelliAPI for API Test Automation? — Tutorial 4](https://medium.com/@osanda.deshan/how-to-use-maxsoft-ata-framework-for-api-test-automation-tutorial-4-5fb265ca5eaf "How to use MaxSoft IntelliAPI for API Test Automation? — Tutorial 4")
7. [How to use MaxSoft IntelliAPI for API Test Automation? — Tutorial 5](https://medium.com/@osanda.deshan/how-to-use-maxsoft-ata-framework-for-api-test-automation-tutorial-5-3b2c22328233 "How to use MaxSoft IntelliAPI for API Test Automation? — Tutorial 5")
<br />

## How to build the MaxSoft IntelliAPI JAR file
## Building the MaxSoft IntelliAPI JAR File
1) Get a clone of this project.
2) Open the command prompt.
3) Navigate to the project directory. \
`cd <project_dir>`
4) Execute this command. \
`mvn clean install -DskipTests`
<br />

## How to test the project code
## Testing the Project
1) Open the command prompt.
2) Navigate to the directory of the **Dev BVT.bat** file. \
`cd <project_dir\bat_files\test_runner_bats>`
2) Navigate to the directory of the **dev_regression_run.bat** file. \
`cd <project_dir\batch_files>`
3) Enter the name of the **.bat** file and the extension. \
`Dev BVT.bat`
`dev_regression_run.bat`
4) Press **Enter**.
<br />

## Support Forum
[Gitter](https://gitter.im/MaxSoft-IntelliAPI/community)

<br />

## License
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/0b/License_icon-mit-2.svg/2000px-License_icon-mit-2.svg.png" alt="MIT License" width="100" height="100"/> [MaxSoft IntelliAPI](https://medium.com/intelliapi) is released under [MIT License](https://opensource.org/licenses/MIT)

<br />

## Copyright
Copyright 2018 MaxSoft.
Copyright 2021 [MaxSoft](https://maxsoftlk.github.io/).
10 changes: 10 additions & 0 deletions batch_files/dev_regression_run.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@echo off
echo Executing MaxSoft IntelliAPI Dev BVT API Test Automation Suite.............

cd ..

call mvn test-compile gauge:execute -DspecsDir="specs" -Dtags="pre_requisites" -Denv="dev"
call mvn test-compile gauge:execute -DspecsDir="specs" -Dtags="regression" -Denv="dev"

echo Exit Code = %ERRORLEVEL%
if not "%ERRORLEVEL%" == "0" exit /b
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
@echo off
echo Executing MaxSoft IntelliAPI Dev BVT API Test Automation Suite.............

cd ..
cd ..

call mvn test-compile gauge:execute -DspecsDir="specs\Pre Test" -Denv="dev"
call mvn test-compile gauge:execute -DspecsDir="specs\Access Token,specs\Data Stores,specs\Other" -Denv="dev"
call mvn test-compile gauge:execute -DspecsDir="specs" -Dtags="pre_requisites" -Denv="dev"
call mvn test-compile gauge:execute -DspecsDir="specs" -Dtags="regression" -Denv="dev"

call mvn clean -DemailConfigEnv=dev install exec:java
echo Exit Code = %ERRORLEVEL%
Expand Down
8 changes: 8 additions & 0 deletions batch_files/executable_doc_generator.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@echo off
echo Executable Document Generation.............

cd ..
gauge docs spectacle specs

echo Exit Code = %ERRORLEVEL%
if not "%ERRORLEVEL%" == "0" exit /b
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@echo off
echo Making MaxSoft IntelliAPI JAR .............

cd ..
cd ..

mvn clean install -DskipTests
Expand Down
22 changes: 0 additions & 22 deletions concepts/Create Deck With 4 Questions.cpt

This file was deleted.

37 changes: 0 additions & 37 deletions concepts/Create Deck.cpt

This file was deleted.

60 changes: 0 additions & 60 deletions concepts/Create Question For Deck.cpt

This file was deleted.

40 changes: 40 additions & 0 deletions concepts/Create a user.cpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Project Name : MaxSoft-IntelliAPI
Developer : Osanda Deshan
Version : 1.0.0
Date : 28/04/2019
Time : 17:56
Description : This is a concept file


# Create a user

* Given that a user needs to invoke "Create a user"
* And the user saves test data inside excel file into data stores
|DataStore Type|Variable Name |Excel Sheet Name |Key Name |
|Scenario |varName |User_Test_Data |name |
|Scenario |varGender |User_Test_Data |gender |
|Scenario |varStatus |User_Test_Data |status |
* And concat random text and save it in a data store as follows
|Is Data Store Used?|Data Store Type|Data Store Variable Name|Original Text |Save To New Data Store?|New Data Store Type|New Data Store Variable Name|
|no | | |Tester_ |yes |Scenario |varNewName |
* And generate random email and save it in a data store as follows
|Data Store Type|Data Store Variable Name|Domain Name |
|Scenario |varEmail |mailinator.com |
* And the user set the request attributes using data stores as follows
|Attribute Value In JSON Template|Is Data Store Used?|Data Store Type|Data Store Variable Name|Attibute Value To Be Set|
|#email |yes |Scenario |varEmail | |
|#name |yes |Scenario |varNewName | |
|#gender |yes |Scenario |varGender | |
|#status |yes |Scenario |varStatus | |
* And the user set the request authentication configurations as follows
|Configuration |Configuration Value|
|Is authentication required? |Yes |
|Do you need to retrieve the access token from the text file? |Yes |
|Provide the access token if you need to authorize the API manually|N/A |
* When the user invokes the API
* Then the status code for the request is "200"
* And the JSON Path Assertions for the response should be equal to the values inside the data stores
|JSON Path |Is Data Store Used?|Data Store Type|Data Store Variable Name|Expected Value|
|$.code |no | | |201 |
|$.data.name |yes |Scenario |varNewName | |
|$.data.email |yes |Scenario |varEmail | |
Loading

0 comments on commit b6dabe9

Please sign in to comment.