How to attaching automation test results to ms teams channel? - playwright

I am currently running my automation (UI) tests on azure devops release pipeline using Playwright. Whenever the test run finishes I Need a notification to my teams using bot. but i face some issue like this enter image description here i am using playwright test runner
Now my question is: is it possible to use this https://www.npmjs.com/package/test-results-reporter NPM Package for playwright testing fream work

Related

How to get jenkins pipeline test results into ReportPortal.io instance?

I have an automated Jenkins workflow that runs and tests a java project. I need to get all the data and results that are outputted by Jenkins into Report Portal (RP).
Initially, I was under the impression that you have to install the ReportPortal.io Jenkins plugin to be able to configure Jenkins to communicate with RP.
However, it appears that the plugin will eventually be deprecated.
According to one of the RP devs, there are APIs that can be used, but investigating them on our RP server does not give very clear instructions on what every API does or if it is what is required to get test data from Jenkins to RP.
How then do I get Jenkins to send all generated data to RP?
I am very familiar with Jenkins, but I am extremely new to Report Portal.
ReportPortal is intended for test execution results collection, not for jenkins logs gathering.
In two words, you need to find reporting agent at their github organization which depends on your testing framework (e.g. junit, testng, jbehave) and integrate it into your project.
Here is example for TestNG framework:
https://github.com/reportportal/example-java-TestNG/

Run Test automation code from Development repository on every push through Bitbucket pipelines

I am Test automation engineer and I have developed my automation code repository to test functional aspect of the product. I want this code to run when any developer pushes feature or bug on the beta environment.
I have built the pipeline on Automation repository, and I am using docker image for selenium and maven for the same. When I push any changes on my repository pipeline triggers but I want this same to happen from different repositories.
One solution I can think of it is Trigger automation pipeline from developer's pipeline through REST API (pipeline-initiated). But this is not a full proof solution as automation pipeline image will not be updated after the changes made by developers.
In short: We have automation tests written in one repo and development code run into one repo. As a part of CI/CD/CT, I want all of these things run automatically and we get the bug free build every time.
You should try Ansible for this scenario. As you already have you docker images . Just wrap it with ansible and use to to trigger automation on different repos push trigger.

ghostinspector(phantomjs) running from jenkins and seeing result in jenkins

I am using ghostinspector to record and run tests. I have also seen API integration.
Is there a way I can create a build and when I trigger this build, it runs test on ghostinspector. (I am able to do this using custom build command in jenkins which makes curl request)
In additional to triggering build I would like to see result in jenkins as well. does ghostinspector or phantomjs test script returns result in TAP format or any other format which jenkins can show as test results
Full disclosure: I work for Ghost Inspector.
We now offer the ability to download results from your test suite in XUnit format via our API that you should be able to use in Jenkins to report on your suite status.
Hope that helps.

Webdriver with Jenkins

Selenium test (testNg) with mvn test from jenkins ,
I cant view the action performed on the browser, it is possible to view the real browser opened and performing action?
I suggest using SeleniumGrid.
You can then let the test run on a node, where you can see all the browser actions. For demonstration purposes, distributed and independent testing I did similar with teamcity for a regression-test project.
Basically there are two steps to setup the environment:
Start the grid for example as background-service.
Start a node which is running within a logged on user context (also as Service or autorun)
optional: Start another node for running tests in background
In your tests the creation of the the WebDriver instance changes like this:
WebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), capability);
Here a link for more details to setup the Grid2: https://github.com/SeleniumHQ/selenium/wiki/Grid2
No. In typical setup, tests from Jenkins run on randomly available node. You don't know which node is available at a given point. Also typically Jenkins nodes tend to run headless browsers (like phantomjs) since they don't have displays.
Jenkins tests are meant to be run without any manual intervention, like on nightly basis for example. You develop tests locally, see how they run in a real browser and then push it to your main suite so that Jenkins can run it for you. If you want to run tests from Jenkins and view test running live then look for paid solutions like saucelabs or browserstack.
You can using BrowserStack. We have recently released a Plugin that allows you to view your test results right inside Jenkins. It's a paid tool of course :(
In Windows you should not install jenkins as windows application (because in this recent version, Microsoft decided to give services their own hidden desktop even you enable the functionality "interact with desktop" in jenkins service), you may have to deploy it from a war file as follows:
1) Download jenkins.war from Jenkins official site
2) Deploy it by the command prompt : java -jar {directoryOfJenkinsFile}/jenkins.war
3) Now you can access jenkins administration on http:// localhost:8080
Hope that helps you !

Running coded test UI with jenkins as part of CI

We currently have coded UI regression test suite (UI function test) which runs perfectly using MTM on test anent/controller.
As part of CI our team is using Jenkins. Here we want to integrate coded UI test with Jenkins. Can you please tell me how can I configure this?
Is there a way Jenkins will access the TFS build of my coded UI test project which will have test run setting file (with info of test controller and agent to run test)?
I don't want to run coded UI tests on Jenkins server (but on test agent) as it will need to have a active desktop session.
A great example of running UI with Jenkins is executing selenium tests. This approach suggests you to run browser and simulate user actions. The same you can do with your UI and basically this does not require any additional configuration steps except slave configuration. You need to use Slave Configuration via Java Web Start as only this gives you ability to interact with Desktop:
If you need display interaction (e.g. for GUI tests) on Windows and you have a dedicated (virtual) test machine, this is a suitable option.
Other slave configuration ways may just not run your UI.

Resources