How to setup robot framework project for docker parallel testing - docker

Hi I am really new to robot framework and docker so please bear with me.
I have test cases written in robot framework using PyCharm which are executing fine.
I also have grid up and running which contains one firefox and one chrome browser.
I want to run my testcases in parallel on that grid. Every test case on a separate browser side by side. I need help on what changes to make in my project and how to execute them on docker.

Tests run on Grid browsers if we pass the following params to Open Browser keyword:
Open Browser ${URL} ${Browser} ${NONE} http://localhost:4444/wd/hub

I'd suggest trying Selenoid, I use it for paralleled cross-browser run on Docker: https://aerokube.com/selenoid/

I have an idea setup CI with Robot Framework, you can get some information to build it:
https://github.com/dylanops/docker-robot-framework

Related

Chrome browserless Selenium on bamboo

I've developed a framework which runs selenium tests with no problem on my local computer.
I also have developed a pipeline on Bamboo to execute those tests. It does, problem is I have no chrome browser installed on bamboo and I get the error saying "There is no chrome binary" obviously. There is no chance to install anything on bamboo, so I need to run these tests with no browser (also headless).
I've checked this: https://github.com/browserless/chrome
Sounds good to what I want to achieve but I don't know how to do it.
Do I need to run docker by command and then point my driver to the port or what?
Can anyone shed some light? I pretty lost and there are not much examples (or I don't know how to find them)
Thanks!!

Selenium robot library: Create WebDriver not sending desired_capabilities in POST request

I am running robot inside a custom docker image using 3.7-slim-buster
I use a setup using selenium/hub:4.1.2-20220217 and selenium/node-docker:4.1.2-20220217 provided by this project.
Basically at the end robot is sending a POST command to the selenium grid including the desiredCapabilities information.
I recently migrated the docker image to use 3.7-slim-bullseye. Robot and selenium python libraries were not changed but now the POST request is missing the desiredCapabilities information which induce problems.
I am wondering if someone already stumbled into this issue and if it is the case how you solved it?
Sincerely

Is it possible to construct automation framework with Selenium+docker, without selenium grid but with Pytest Internal parallel execution system?

Currently, I have an automation framework that consists of the following stack:
Python
Pytest Framework (and pytest-xdist parallel mechanized)
Selenium
Allure report system
Jenkins
I'm going to add a docker containerization system as well, to run tests using it on a windows server.
I'm running my tests using pytest's internal parallel run (pytest-xdist) functionality using 'workers'
the run command looks like this:
os.system("pytest -v -s --alluredir="'C:\AllureReports\Data'" --html=report.html --developer=dmitriy --timeout=60 --self-contained-html --dist=loadfile -n=3 -m=regression")
As you can see '-n=3' is the number of 'nodes' that the suite will be executed. In other words, the regression suite will run in a parallel run of 3 nodes.
Can you tell me if it is possible to avoid using Selenium-Grid mechanized, and use this pytest's internal parallel run system instead -> pytest-xdist, and how?
Will appreciate relevant technical articles or explanations of how it can be done.
I have gone over this question - pytest-xdist vs selenium hub
but got only a really overview impression which is not enough

Do I have to compile to JavaScript?

imagine you wanna build a web project for the public without any JavaScript dependencies, because you just love Dart. Do I have to compile Dart to JavaScript no matter what or is it possible to run Dart VM on server side with some nginx config.
If you have server-side code in Dart, you can run it on the server using the Dart VM - no need to compile to JS here.
Using nginx with server-side Dart might have advantages for some use cases but it is by no means necessary.
For code that is supposed to run in the browser, you need to compile to JS first.
Dart is deployable everywhere, check deployment diagram showing where it runs inside Dart VM and where it runs compiled.

Automating installation in Websphere Application server

I'm using IBM RAD as the IDE and Websphere Application Server v6.0 to deploy applications.
I'm working on a EJB application and build it using ANT and then deploy it using the Admin Console of the server. For every change this deploying is time consuming. 'Run on server' on the EAR file does not work sometimes.
Is it possible to automate the installation of the ear file too?
When I build the ear file, I should be able to deploy it to the server too from command line or from ant script.
Can you please help me with your suggestions?
Try the Rapid Deployment (WRD) and see if that helps you.
Pretty much what you do is drop your EAR into a designated directory that WRD monitors and it takes care of the installation,uninstallation and updates.
The best alternative is to have the build script that does the installation using ws_ant tasks. For a start i would suggest you try this approach too and see if that is useful.
HTH
Manglu
First, my usual pattern using RAD is to have a WebSphere Test environment set up and "run with resources in workspace". This is quick, requires no extra build or deploy steps, no routine use of the admin console.
Sometimes one does need to make sure that everything on the server is tidied up - then I remove the projects from the server (in RAD) and also make sure they are stopped and deleted in the admin console.
Second, everything you do in the admin console can be scripted using the command line tool wsadmin. So yes you can deploy your ear files automatically. If you are intending to do that I recommend that you create a new Server profile, do not run it from inside RAD - just to avoid confusion.
I only use stand alone servers for specialised testing, it's clearly more work that the simple save and run made possible when running on a test server with resources in workspace.
If you find the native RAD approach unreliable I suggest you add some mroe questions ... it does work in general.
Agreed, keep the setup simple as possible and create the project from scratch in RAD to make sure it deploys ok.
Bit of a pain as you will then need to maintain a separate ant script but RAD does work well in general.
Karl
It's pretty easy to write a wsadmin script that will update/redeploy your application after you rebuild.
-Rick

Resources