kandi background

zalenium | scalable container based Selenium Grid with video recording | Functional Testing library

 by   zalando Java Version: 3.141.59z License: Non-SPDX

 by   zalando Java Version: 3.141.59z License: Non-SPDX

Download this library from

kandi X-RAY | zalenium Summary

zalenium is a Java library typically used in Telecommunications, Media, Media, Entertainment, Testing, Functional Testing, Docker, Selenium applications. zalenium has no bugs, it has no vulnerabilities, it has build file available and it has high support. However zalenium has a Non-SPDX License. You can download it from GitHub.
<p align="center"> <img id="header" height="214" width="500" src="./docs/img/logo_zalenium_wide.png" />. [![Build Status](https://travis-ci.org/zalando/zalenium.svg?branch=master)](https://travis-ci.org/zalando/zalenium) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/c719a14f5537488b8fb95d70e27acd5f)](https://www.codacy.com/app/diemol_zalenium/zalenium?utm_source=github.com&utm_medium=referral&utm_content=zalando/zalenium&utm_campaign=Badge_Grade) [![codecov](https://codecov.io/gh/zalando/zalenium/branch/master/graph/badge.svg)](https://codecov.io/gh/zalando/zalenium) [![GitHub release](https://img.shields.io/github/release/zalando/zalenium.svg)](https://github.com/zalando/zalenium/releases) [![Docker Pulls](https://img.shields.io/docker/pulls/dosel/zalenium.svg)](https://hub.docker.com/r/dosel/zalenium/tags/) [![Slack](https://img.shields.io/badge/chat-on%20slack-red.svg?logo=slack)](https://seleniumhq.herokuapp.com).
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • zalenium has a highly active ecosystem.
  • It has 2352 star(s) with 547 fork(s). There are 140 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 26 open issues and 613 have been closed. On average issues are closed in 50 days. There are 4 open pull requests and 0 closed requests.
  • It has a negative sentiment in the developer community.
  • The latest version of zalenium is 3.141.59z
zalenium Support
Best in #Functional Testing
Average in #Functional Testing
zalenium Support
Best in #Functional Testing
Average in #Functional Testing

quality kandi Quality

  • zalenium has 0 bugs and 0 code smells.
zalenium Quality
Best in #Functional Testing
Average in #Functional Testing
zalenium Quality
Best in #Functional Testing
Average in #Functional Testing

securitySecurity

  • zalenium has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • zalenium code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
zalenium Security
Best in #Functional Testing
Average in #Functional Testing
zalenium Security
Best in #Functional Testing
Average in #Functional Testing

license License

  • zalenium has a Non-SPDX License.
  • Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.
zalenium License
Best in #Functional Testing
Average in #Functional Testing
zalenium License
Best in #Functional Testing
Average in #Functional Testing

buildReuse

  • zalenium releases are available to install and integrate.
  • Build file is available. You can build the component from source.
  • Installation instructions, examples and code snippets are available.
  • zalenium saves you 6774 person hours of effort in developing the same functionality from scratch.
  • It has 14053 lines of code, 980 functions and 116 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
zalenium Reuse
Best in #Functional Testing
Average in #Functional Testing
zalenium Reuse
Best in #Functional Testing
Average in #Functional Testing
Top functions reviewed by kandi - BETA

kandi has reviewed zalenium and discovered the below as its top functions. This is intended to give you an instant insight into zalenium implemented functionality, and help decide if they suit your requirements.

  • Check if there are any containers starting .
  • Creates a new readyable pod .
  • Executes the last command .
  • Adds a proxy to the nodes list .
  • Saves the dashboard information .
  • Downloads a file from the URL .
  • Merge the specified object with this instance .
  • Build the env variables needed to build the environment variables .
  • Renders the summary of the proxy .
  • Get test information

zalenium Key Features

[Dashboard](http://localhost:4444/dashboard), see all the videos and aggregated logs after your tests completed. &lt;p align="center"&gt; &lt;img id="dashboard" width="600" src="docs/img/dashboard.gif" /&gt; &lt;/p&gt;

Live preview of your running tests [http://localhost:4444/grid/admin/live](http://localhost:4444/grid/admin/live) &lt;p align="center"&gt; &lt;img id="live-preview" width="600" src="docs/img/live_preview.gif" /&gt; &lt;/p&gt;

Video recording, check them in the /tmp/videos folder (or the one you mapped when starting Zalenium)

Customise video file naming via capabilities, basic auth and [more](https://zalando.github.io/zalenium/#usage)

zalenium Examples and Code Snippets

  • Getting Started
  • How can i use testng IAnnotationTransformer?
  • kubernetes ingress-controller CrashLoopBackOff Error
  • Use custom profile on Zalenium to enable DRM
  • How can we execute WebUI feature file against multiple browsers using parallel runner or distributed testing?

Getting Started

```sh
 # Pull docker-selenium
  docker pull elgalu/selenium

Community Discussions

Trending Discussions on zalenium
  • How can i use testng IAnnotationTransformer?
  • kubernetes ingress-controller CrashLoopBackOff Error
  • Can I set driver's version when use zalenium
  • Enabling SSL/HTTPS for Zalenium
  • Use custom profile on Zalenium to enable DRM
  • Download recorded video of UI test case from Zalenium/Selenium
  • upload a file with Karate testing through web interface using a Selenium grid and jenkins
  • How can we execute WebUI feature file against multiple browsers using parallel runner or distributed testing?
Trending Discussions on zalenium

QUESTION

How can i use testng IAnnotationTransformer?

Asked 2021-Apr-20 at 14:58

I'm trying to set group name when i start my test, and i want if for example testNg groups annotation is BS only run test for firefox.

I used for this IAnnotationTransformer but it's doesn't work. Maybe i have a mistake but i don't get it. Can you help me? By the way i'm using BDD and when i run my test, it is not get in MyTransformer class. These are my codes;

Testng.xml

<suite name="Suite" data-provider-thread-count="8"
       thread-count="1" parallel="tests">
    <listeners>
        <listener
                class-name="com.demo.listeners.TestNGListener"/>
        <listener
                class-name="com.demo.listeners.MyTransformer"/>
    </listeners>
    <test name="Firefox">
        <parameter name="browser" value="firefox"></parameter>
        <groups>
            <run>
                <include name="bs"/>
            </run>
        </groups>

        <classes>
            <class
                    name="com.demo.runner"/>
        </classes>
    </test>
    <test name="Chrome">
        <parameter name="browser" value="chrome"/>
        <groups>
            <run>
                <include name="zalenium"/>
            </run>
        </groups>

        <classes>-->
            <class-->
            name="com.demo.runner"/>
        </classes>
    </test>
</suite>

And my transformer class

package com.demo.listeners;

import org.testng.annotations.ITestAnnotation;
import org.testng.internal.annotations.IAnnotationTransformer;

import java.lang.reflect.Constructor;
import java.lang.reflect.Method;

public class MyTransformer implements IAnnotationTransformer {


    @Override
    public void transform(ITestAnnotation iTestAnnotation, Class aClass, Constructor constructor, Method method) {
        System.out.println("demo");
        String[] a = new String[]{"bs"};
        String[] b = new String[]{"zalenium"};
        if (iTestAnnotation.getTestName().equals("firefox"))
            iTestAnnotation.setGroups(b);
        else
            iTestAnnotation.setGroups(a);
    }
}

ANSWER

Answered 2021-Apr-20 at 14:58

The below code is printing groups set on method FirstTestNGFileTest just before getting it

  package YourPackage;
   import java.lang.reflect.Constructor;
   import java.lang.reflect.Method;
     import org.testng.annotations.CustomAttribute;
    import org.testng.IAnnotationTransformer;
    import org.testng.annotations.ITestAnnotation;
    
    public class YourClass implements IAnnotationTransformer {
    
        @Override
            public void transform(ITestAnnotation annotation, Class testClass,
                    Constructor testConstructor, Method testMethod) {  
                     
                if (testMethod.getName()=="FirstTestNGFileTest") {
                      String grps[]= new String[] { "regression" };     
                      annotation.setGroups(grps);
                    System.out.println("groups..."+ Arrays.toString(annotation.getGroups()));
               
                 //prints groups...[regression]
         
                } 
    }

In testng.xml file , mention this

<listeners>

      <listener class-name = "YourgPackage.YourClass" />
   </listeners>

Also make sure that the method is producing results when run usually

Source https://stackoverflow.com/questions/67107324

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install zalenium

Docker engine running, version >= 1.11.1 (probably works with earlier versions, not tested yet). Make sure your docker daemon is running (e.g. docker info works without errors). Pull the [docker-selenium](https://github.com/elgalu/docker-selenium) image. docker pull elgalu/selenium. Zalenium uses docker to scale on-demand, therefore we need to give it the docker.sock full access, this is known as "Docker alongside docker". Why --privileged? We suggest you run Zalenium as --privileged to speed up the node registration process by increasing the entropy level with [Haveged](http://www.issihosts.com/haveged/). Using --privileged is optional since it is just meant to improve its performance. For more information, check this [tutorial](https://www.digitalocean.com/community/tutorials/how-to-setup-additional-entropy-for-cloud-servers-using-haveged). Try also our one line installer and starter for OSX/Linux (it will check for the latest images and ask for missing dependencies.). More usage examples, parameters, configurations, video usage and one line starters can be seen [here](https://zalando.github.io/zalenium/#usage). After the output, you can check the [grid](http://localhost:4444/grid/console) console. Now you can point your Selenium tests to [http://localhost:4444/wd/hub](http://localhost:4444/wd/hub). Stop it: docker stop zalenium.
Docker engine running, version >= 1.11.1 (probably works with earlier versions, not tested yet).
Make sure your docker daemon is running (e.g. docker info works without errors).
Pull the [docker-selenium](https://github.com/elgalu/docker-selenium) image. docker pull elgalu/selenium
docker pull dosel/zalenium
Zalenium uses docker to scale on-demand, therefore we need to give it the docker.sock full access, this is known as "Docker alongside docker". ```sh # Pull docker-selenium docker pull elgalu/selenium # Pull Zalenium docker pull dosel/zalenium docker run --rm -ti --name zalenium -p 4444:4444 \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /tmp/videos:/home/seluser/videos \ --privileged dosel/zalenium start ```
Why --privileged? We suggest you run Zalenium as --privileged to speed up the node registration process by increasing the entropy level with [Haveged](http://www.issihosts.com/haveged/). Using --privileged is optional since it is just meant to improve its performance. For more information, check this [tutorial](https://www.digitalocean.com/community/tutorials/how-to-setup-additional-entropy-for-cloud-servers-using-haveged).
Try also our one line installer and starter for OSX/Linux (it will check for the latest images and ask for missing dependencies.) ```sh curl -sSL https://raw.githubusercontent.com/dosel/t/i/p | bash -s start ```
More usage examples, parameters, configurations, video usage and one line starters can be seen [here](https://zalando.github.io/zalenium/#usage)
After the output, you can check the [grid](http://localhost:4444/grid/console) console
Now you can point your Selenium tests to [http://localhost:4444/wd/hub](http://localhost:4444/wd/hub)
Stop it: docker stop zalenium

Support

This is a Selenium Grid extension to scale your local grid dynamically with docker containers. It uses [docker-selenium](https://github.com/elgalu/docker-selenium) to run your tests in Firefox and Chrome locally, if you need a different browser, your tests can get redirected to a cloud testing provider ([Sauce Labs](https://saucelabs.com/), [BrowserStack](https://www.browserstack.com/), [TestingBot](https://testingbot.com/), [CrossBrowserTesting](https://crossbrowsertesting.com/), [LambdaTest](https://www.lambdatest.com/)). Zalenium also works out of the box in [Kubernetes](https://zalando.github.io/zalenium/#kubernetes). Zalenium’s maintainers add new features regularly. We invite you to test it, report bugs, suggest any ideas you may have, and contribute. See our [contributing guidelines](https://zalando.github.io/zalenium/#contributing) for more details.

DOWNLOAD this Library from

Build your Application

Share this kandi XRay Report

Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit