ScriptlessAutomation
  • 👋Welcome to Scriptless Automation
  • Discover More About Automation
    • ⚙️Automation platform intro
    • 💡Advantages of Scriptless Automation
    • 🚀Release Notes
      • 📖Open Code
      • 📕License Code
  • Product tools
    • 📪Pre-request Tools
    • 🔧Project Dependencies
  • Automation Architecture
    • 🎨Flow diagram
  • Get Started
    • 🛠️Start with Automation
    • 📖Open Code Automation
      • 🌏Web Automation
      • ↔️API Automation
    • 🏢Maven Configuration
    • 🗜️Setting Up Maven Project in IntelliJ IDEA
    • 🎛️Scriptless Config
      • 🕸️BrowserConfiguration
        • chrome.properties
      • 👥CommunicationConfiguration
        • SlackConfiguration.properties
      • 📧MailConfiguration
        • gmailCredentials.properties
      • 🛂ReportConfiguration
        • extentReportConfiguration.properties
      • 🕵️TestManagementConfiguration
        • testRail.properties
        • zephyrscale.properties
        • testiny.properties
      • ⚙️testNgConfiguration.properties
    • 🍱TestData Configuration
    • 👨‍💼Gherkin Language and Scriptless Automation Framework
  • Automation Import Notes
    • 🎨Points to Remember
  • Automation Platforms
    • 👾ScriptlessApi Automation
      • 🖊️Introduction
      • 🗜️Api Automation Setup
      • 🔃Supported API Request Types
      • 🪧API Automation Template
      • 📚Example of API Requests
        • ⬇️GET
        • ↕️POST
        • ⤵️PUT
        • ❌DELETE
      • 🎯API Response Validation
      • 👨‍👦API Dependent TestCase
      • 📝Store API Variables
      • 📔API with JSON body
      • 🙋‍♂️Api Wait
      • 🗜️API Schema Validation
      • 🏗️API Tailor-Made coding
      • 👨‍🦯API Support Generator
      • ↘️Api Response Store Objects
      • ✍️API Test Report
      • 🚃Api Response Type Validation
    • 🌐ScriptlessWeb Automation
      • 🖊️Introduction
      • 🗜️Web Automation Setup
      • 🪧Web Automation Template
      • 🧮page_object_locators
      • 📜Web Automation Key Phrases
        • 📃PAGE_NAME
        • ⌛WAIT_TYPE
        • 📜SCROLL_TYPE
        • 👨‍💼ELEMENT_NAME
        • 🏎️ACTIONS
        • ⌨️SEND_KEYS
        • ✔️VALIDATION
        • ✅VALIDATION_TYPE
      • 👨‍👦Web Dependent Test Case
      • 🐒MOCK
      • 🛂AutomationAsserts
      • 🏗️Web Tailor-Made coding
      • 📝Store Web Variables
      • 🤼‍♀️Web & API integration
      • 🖇️Dynamic Strings
      • 🗣️ReadFile Annotation for Custom Code
      • 🖼️Page_Comparison
      • 👨‍💼Gherkin Template for Web Automation
    • 📱Mobile Automation
  • 🪶Automation features
    • 🌲Environment and System Variables
    • 🗝️KeyInitializers
      • Types of KeyInitializers
    • ✍️Reporting
      • Dashboard
      • Category
      • Tests
        • Screenshot Section
    • 👯Parallel Testing
    • 🏗️Tailor-Made Coding
  • ⏩Automation Demo
Powered by GitBook
On this page

Was this helpful?

  1. Automation Import Notes

Points to Remember

PreviousGherkin Language and Scriptless Automation FrameworkNextScriptlessApi Automation

Last updated 8 months ago

Was this helpful?

IDE Run Configuration

To run automation through intellij/IDE one should need to create a configuration in intellij

  • Main Class:

    in.precisiontestautomation.runner.ScriptlessApplication
    • The entry point of the automation process.

  • CLI Arguments: true

    • true specifies execution through Maven and false specifies not executing through maven.

While setting up configuration on IDE keep CLI Arguments asfalse . This configuration tell the framework that it got triggered by IDE.

Difference between true and false

  • true: it indicates that the automation was initiated by Maven. In this scenario, the automation process first generates a TestNG file in the target folder, which then needs to be manually triggered to run the tests

  • false: it signifies that the automation was started from an Integrated Development Environment (IDE). Here, the automation process directly executes the test cases and subsequently creates a TestNG file in the target folder upon completion of the test execution.

Maven Run Configuration

The below configuration should be added to the pom of the project:

<build>
        <sourceDirectory>/src/main</sourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.10.1</version>
                <configuration>
                    <compilerArgument>-parameters</compilerArgument>
                    <parameters>true</parameters>
                    <testCompilerArgument>-parameters</testCompilerArgument>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>java</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <mainClass>in.precisiontestautomation.runner.ScriptlessApplication</mainClass>
                    <arguments>
                       <argument>true</argument>
                    </arguments>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M4</version>
                <configuration>
                    <argLine>-XX:+ExplicitGInvokesConcurrent</argLine>
                    <argLine>--add-opens java.base/java.lang.reflect=ALL-UNNAMED</argLine>
                    <testFailureIgnore>false</testFailureIgnore>
                    <suiteXmlFiles>
                        <suiteXmlFile>target/testngenerator.xml</suiteXmlFile>
                    </suiteXmlFiles>
                </configuration>
            </plugin>
        </plugins>
    </build>

Maven Commands

maven command to execute automation through terminal using maven command

mvn clean exec:java test

Maven Goals explanation

  • mvn -> This is the command line invocation of Maven

  • clean -> This is a Maven phase that belongs to the 'clean' lifecycle. When you run mvn clean, it removes the files in the project's target directory (the default build directory in Maven)

  • exec:java -> This is a goal from the exec-maven-plugin. The exec:java goal is used to execute a Java class in the current project with the specified main class and arguments

  • test -> The mvn test command is part of Maven's 'test' lifecycle phase. Executing this command activates TestNG tests specified under the maven-surefire-plugin in the project's pom.xml file.

TestCase Name Syntax

Our test automation framework employs a structured naming convention for test cases to ensure clarity and easy traceability. Each test case file is named following the format: "TestCaseId_GroupName.csv".

Components of the Naming Convention

  1. TestCaseId:

    • Description: This is the unique identifier for the test case, as recorded in our test management tool.

    • Purpose: Helps in tracing the automated test back to its corresponding test case in the test management system for reference and reporting.

  2. GroupName:

    • Description: Indicates the test group or category to which the test case belongs. Common groups include 'sanity', 'smoke', and 'regression'.

    • Purpose: Facilitates organizing and selecting test cases based on testing phases or objectives.

File Format

  • .csv: The test cases are saved in CSV (Comma-Separated Values) format, which allows for easy editing and readability.

  • .feature: The test cases are saved in Gherkin syntax, which allows for easy editing and readability. This format defines test cases in a natural language style (e.g., "Given-When-Then"), making it accessible to both technical and non-technical stakeholders.

Examples

  • 101_sanity.csv: A test case with ID 101, designated for the sanity test suite.

  • 204_regression.csv: A test case with ID 204, meant for regression testing.

  • 301_sanity.feature: A test case with ID 301, written in Gherkin syntax, designated for the sanity test suite.

🎨