Example project for using the Selenium toolkit with Kotlin, Maven, TestNg and the config is managed via a property file.

Overview

Selenium-Java-Toolkit-TestNg-Playground

This is the sample-Project and show you how to use the Selenium-Toolkit. The Selenium-Toolkit is a Java based test-toolkit for selenium-testing with testNg or Junit. This sample-Project shows how to use it with testNg.

The goal of the toolkit is, to support you by creating and maintainig your seleniumtests. It also give you a nice Report to have a better overview.

Instructions and Help

Please visit our Page Showcase to learn more about the different Parts of the Toolkit and how its working

Installation

Download this project to get started. There should be all inside this Project what you need for a fast start.

Run tests

mvn test site

if you don't want to see old runs or use Allure-Jenkins-Plugin, add clean:

mvn clean test site

you are also able to just click on a "Run Test" button in your IDEA and then run "mvn site" to create the Report.

Watch Report

Open the file target/site/allure-maven.html in Chrome

Add Toolkit to your existing Project

**This is the instruction, how you can add this toolkit into your existing Test-Project, if you don't want to download this Project.

If you starts on the Green or don't want to do all this things, please simply use this Project.**

Pom modifications

and optional the other 2 Dependencies for DB-Connections

pom.xml:

<dependency>
    <groupId>com.selenium-toolkitgroupId>
    <artifactId>selenium-java-toolkit-testNg-proartifactId>
    <version>1.3.23version>
    <scope>testscope>
dependency>

Define Properties

pom.xml:

<properties>
    <project.build.sourceEncoding>UTF-8project.build.sourceEncoding>
    <maven.compiler.source>1.8maven.compiler.source>
    <maven.compiler.target>1.8maven.compiler.target>
    <aspectj.version>1.8.10aspectj.version>
properties>

Configure Build and Reporting

pom.xml:

org.aspectj aspectjweaver ${aspectj.version} true com.selenium-toolkit allure-maven 2.10_acl_2.8.1-1.3.23 ">
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.pluginsgroupId>
            <artifactId>maven-surefire-pluginartifactId>
            <version>2.22.2version>
            <configuration>
                <testFailureIgnore>truetestFailureIgnore>
                <suiteXmlFiles>
                    <suiteXmlFile>src\test\resources\SampleTestConfig.xmlsuiteXmlFile>
                suiteXmlFiles>
                <systemProperties>
                    <property>
                        <name>projectArtifactIdname>
                        <value>${project.artifactId}value>
                    property>
                systemProperties>
                <argLine>
                    -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
                argLine>

            configuration>
            <dependencies>
                <dependency>
                    <groupId>org.aspectjgroupId>
                    <artifactId>aspectjweaverartifactId>
                    <version>${aspectj.version}version>
                dependency>
            dependencies>
        plugin>
    plugins>
build>
<reporting>
<excludeDefaults>trueexcludeDefaults>
<plugins>
    <plugin>
        <groupId>com.selenium-toolkitgroupId>
        <artifactId>allure-mavenartifactId>
        <version>2.10_acl_2.8.1-1.3.23version>
    plugin>
plugins>
reporting>

Usage

Configure the Toolkit

You are able to define 2 type of Configurations:

Read more about the Configuration-Class or the TestData-Management and how to switch them. or about the Configuration-Property or the TestData-Management and how to switch them.

Define testNg xml

src\test\resources\SampleTestConfig.xml:

">
xml version="1.0" encoding="UTF-8"?>
DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Sample Suite">
    <test name="Sample Test" parallel="methods" thread-count="1">
        <groups>
            <run>
                <include name=".*"/> 
            run>
        groups>
        <packages>
            <package name="com.seleniumToolkit.selenium.test.*"/>
        packages>
    test>
suite>

Run tests

mvn test site

if you don't want to see old runs or use Allure-Jenkins-Plugin, add clean:

mvn clean test site

Watch Report

Open the file target/site/allure-maven.html

Configure Report Categories (optional)

If you want you can define Categories, please see doku in link.

Contributing

You might also like...
Server & Web App of Tolgee localization toolkit
Server & Web App of Tolgee localization toolkit

Server & Web App of Tolgee localization toolkit

BindsAdapter is an Android library to help you create and maintain Adapter class easier via ksp( Kotlin Symbol Processing).

BindsAdapter BindsAdapter is an Android library to help you create and maintain Adapter class easier via ksp( Kotlin Symbol Processing). Installation

Demo Spting REST Service on Kotlin. Works with PostgreSQL via Spring Data. Data initialization provided by liquibase

Spring Boot REST API with Kotlin Spring Boot REST API service. Spring Data with PostgreSQL. Data initialization with Liquibase. Swagger UI Reference D

Example of Android project showing integration with Kotlin and Dagger 2

kotlin-dagger-example This project demonstrate how to setup an Android Project with Kotlin and Dagger 2. It's based on Dagger 2 example ##Known issues

A deep learning based mobile application for the multi-class classification of pneumonia into three categories via Chest X-rays

PneumoniaClassifier A deep learning based mobile application for the multi-class classification of pneumonia into three categories via Chest X-rays. W

DSU-Sideloader - A simple app made to help users easily install GSIs via DSU's Android feature
DSU-Sideloader - A simple app made to help users easily install GSIs via DSU's Android feature

DSU Sideloader A simple app made to help users easily install GSIs via DSU's And

A clean architecture example. Using Kotlin Flow, Retrofit and Dagger Hilt, etc.
A clean architecture example. Using Kotlin Flow, Retrofit and Dagger Hilt, etc.

android-clean-architecture A clean architecture example. Using Kotlin Flow, Retrofit and Dagger Hilt, etc. Intro Architecture means the overall design

Webclient-kotlin-sample - An example of using the http web client to promote synchronous and asynchronous https calls

Web Client Consumer Kotlin Sample The project is an example of using the http we

Kotlin Example of how to organize your code using MVC and some patterns seen in class
Kotlin Example of how to organize your code using MVC and some patterns seen in class

Kotlin Example of how to organize your code using MVC and some patterns seen in class

Releases(v1.3.26)
  • v1.3.26(Dec 15, 2021)

    Upgrade Steps

    • If you are Using the Neoload-Addon pleyse change in all seleniumTest-Annotations the Argument named "nlPurePath" to "performanceRecordingName"

    Added

    • SauceLabs GridVendor: It is now possible to define the grid in the Setting-Class via an enum, in which all SauceLabs-Grid-Destinations are stored.
    • Gatling Recording Modul: A Gatling Recording module has been added. With this module, the running tests are additionally recorded automatically in Gatling and finally provided as Scala Gatling scripts

    Changed

    • The SeleniumTest-Annotation Argument "nlPurePath" was renamed to "performanceRecordingName"

    Fixed

    • SauceLabs GridVendor: The Har download with activated performance analysis did not work depending on the SauceLabs grid destination and has now been fixed
    • Errors when starting the tests, e.g. wrong license code or wrong configurations, are displayed in the log again and no longer end up in Surefire dump files
    • The exception handling has been improved so that there are no more additional exceptions if there is a crash and you don't have an Allure step open. Previously, the toolkit always tried to close the current step, even if none was open.
    Source code(tar.gz)
    Source code(zip)
  • v1.3.25(Nov 10, 2021)

    Upgrade Steps

    -

    Added

    • Webdriver Autodownload: We have extended the toolkit with a dependency, so that now via the configuration auto-download, the Driver.exe to the browsers will be downloaded automatically. If this leads to errors or no internet access is available, this can of course still be switched off.
    • License-Server: Now the license can be pulled via a SeleniumToolkit license server. Licenses are bound to the projects. So first the project must be registered on the server. The toolkit then connects to the server defined in the config to get the license.
    • Networktraffic-Capturing Mode: If the mode is enabled, the test will automatically start a proxy which captures the Networktraffic. A HAR file is attached to the report.
    • Saucelabs-Gridvendor: We added Sazcekabs functions, Saucelabs as a Gridvendor and SaucelabsOptions to allow an easy handling of Saucelabs specifics.

    Changed

    • We have added multiple configurations samples in this sample project so that all methods are now overwritten and described. So it should be even easier to see all configurations and their effects.

    Fixed

    -

    Source code(tar.gz)
    Source code(zip)
  • v1.3.24(Nov 10, 2021)

    Upgrade Steps

    -

    Added

    -

    Changed

    Logging-Area:

    • Logging to the console and also to the log file (at log level debug) has been redesigned. Log messages are now more structured and more detailed.

    Fixed

    Mobile-Area:

    • The capability "app" was classified as not W3C compliant and therefore filtered out in our W3C filter. The W3C filtering for mobile has been removed.

    SettingClass-Area:

    • If a target.env is set, but a corresponding setting class did not exist, an error was thrown. This has been fixed so that the setting class without target.env is used in that case.
    Source code(tar.gz)
    Source code(zip)
Owner
Selenium Consulting
Selenium Consulting
Spring-with-maven - Spring Boot App with Postgresql and maven

Spring Boot Api Aplikasi ini dibuat menggunakan bahasa kotlin dan untuk database

Aldi Aulia Rosyad 1 Jan 12, 2022
Maxibon kata for Kotlin Developers. The main goal is to practice property based testing.

Kata Maxibon for Kotlin. We are here to practice property based testing. We are going to use KotlinTest to write our tests. We are going to practice p

Karumi 44 Oct 3, 2022
Kotlin compiler plugin that allows class delegation to be dynamic like property delegations

kotlin-dynamic-delegation Kotlin compiler plugin that allows class delegation to be dynamic like property delegations. The plugin is working in progre

Him188 14 Sep 8, 2022
FirestoreCleanArchitectureApp is an app built with Kotlin and Firestore that displays data in real-time using the MVVM Architecture Pattern. For the UI it uses Jetpack Compose, Android's modern toolkit for building native UI.

FirestoreCleanArchitectureApp FirestoreCleanArchitectureApp is an app built with Kotlin and Cloud Firestore that displays data in real-time using Andr

Alex 66 Dec 15, 2022
KSP extension for the kotlin-maven-plugin

kotlin-maven-symbol-processing Extension for the kotlin-maven-plugin to support Kotlin Symbol Processing (KSP). Usage To use this extension, add the d

Dyescape 19 Dec 18, 2022
Kotlin cli maven spring failsafe findbugs cucumber mockito junit car data

Kotlin cli maven spring failsafe findbugs cucumber mockito junit car data

null 0 Feb 1, 2022
Gha-central-test - GitHub Actions Maven Central Test

GitHub Actions Maven Central Test Pushing a tag does a release. Local Maven Depl

James Ward 1 Jan 19, 2022
A basic, incomplete, buggy, far from efficient UI toolkit for Kotlin/Android. An experiment for fun and to learn.

Apex Apex is just a simple proof of concept to demonstrate how easily you can build your own UI Toolkit from scratch. This code base is most likely fu

Romain Guy 79 Sep 7, 2022
A basic, incomplete, buggy, far from efficient UI toolkit for Kotlin/Android. An experiment for fun and to learn.

Apex Apex is just a simple proof of concept to demonstrate how easily you can build your own UI Toolkit from scratch. This code base is most likely fu

Romain Guy 79 Sep 7, 2022
Restful Toolkit for IntelliJ IDEA

restful-toolkit Template ToDo list Create a new IntelliJ Platform Plugin Template project. Get known with the template documentation. Verify the plugi

KeepWalking... 56 Dec 14, 2022