How to trigger reports mail on fitnesse slim test runs? - continuous-integration

We are using Fitnesse slim in our project. As of now we were executing the fitnesse tests (slim) from wiki page and we were checking the results manually from wiki itself.
Now, we are planning to implement CI for our project. So, is there a way to integrate fitnesse slim with AnthilPro (CI tool) and can run fitnesse tests / suits automatically and send the execution results to specified set of email IDs ?
Kindly help me out. I know that, many have already implemented this. But, i am not getting the exact info i am looking for anywhere.
Thank you,
Chethan

I'm not familiar with anthillpro, but I run fitnesse test using their junit runner on teamcity and Jenkins.
This produces test results those ci tools pick up automatically, and html reports for people to see the test details.
Mailing people based on build outcome is a standard feature of the tools. I assume for anthill also.
Would that work for you?
My fitnesse baseline project contains a maven setup to run a fitnesse suite with a single maven call: mvn clean test-compile failsafe:integration-test.
I assume that making a job the checks out a project, executes a maven call and then e-mails based on test outcome is just as simple to setup in anthill as in other ci tools.

Related

Is there a way to run cypress test to test web application deployed on AWS in different environments?

I can give the URL in cy.visit to point to deployed application, but I am not clear on the setup, as I don't have CI/CD yet. The goal is to be able to run this test on a button click, not having to checkout workspace and build the application.
I can give the URL in cy.visit to point to deployed application, but I am not clear on the setup, as I don't have CI/CD yet. The goal is to be able to run this test on a button click, not having to checkout workspace and build the application.
Yes, you could test your application directly on a staging/preproduction environment on AWS without A CI/CD.
However, I would not recommend using Cypress against a production environment because for E2E testing to be efficient, you will probably create/delete/edit many things, which may not be suited for a prod env.
Finally, it depends on what you try to achieve with your tests. In general, you will use Cypress to ensure your product works as expected after adding a new feature, for example. You always want to test against the latest version of your code.
On the setup, the E2E tests can be packaged in the project and run manually until you have a CI to execute them automatically.
https://docs.cypress.io/guides/guides/command-line#cypress-run

Rest api to get sonarqube info from bamboo build or vice versa

Is there any way I can get any sonarqube api which can provide the build number of bamboo or any bamboo api which can give sonarqube info.This would really help.
I have so far tried both side but i am surprised both the system are quite clueless about each other. Why it is not possible that a build which ran sonarqube as as one of it's job doesn't have any information about that. Also neither in sonar it tell which build has actually triggered that sonar execution
(Not sure I understand what exactly you are looking for, perhaps this ...? )
I don't believe you can relate a specific Activity (SonarQube analysis) to a specific build (Bamboo), just project to job.
You must have SonarQube Server configured in Bamboo
When executing your job, you can add these sonar.links optional parameters to the analysis step:
sonar.links.homepage Project home page.
sonar.links.ci Continuous integration.
and
sonar.links.scm Project source repository.
sonar.links.issue Issue tracker.
Maybe also specify sonar.host.url=$SONAR_HOST_URL (where SONAR_HOST_URL is the global setting in Bamboo) in the analysis step parameters.
Those populate the Project Overview page sidebar:
That should provide the links from SonarQube back to the other systems of interest.
If you have properly configured Bamboo, you should see a link in Bamboo to the SonarQube project, post execution.

update Jira Issue with robot test results run through Jenkins pipeline

I am writing tests in RobotFramework and running them through Jenkins pipeline.
I would like to integrate the test results with associated Jira issue automatically?
Can anybody explain step by step process on how to do it?
Running tests in the pipeline. You mean on application build ? You'd want to be sure your tests are rock solid or your Jira ticket is gonna have a load of failure results attached to it. Depending on the processes you have in place with QA this may prove troublesome.
As for doing something like this automatically. We've done something similar in the past but we never wanted it to be part of the CI pipeline. It was a separate step that took the output.xml and uploaded them to Jira/X-Ray using Jira API. But it was a bespoke piece of software.

Acceptance Test and CI

We have 3 types of tests, unit, functional and acceptance.
The first 2 can be run with phpunit or other tools on top of it like codeception. So in CI the deploy script will run all these tests and if one fail build will fail and merge request will be cancelled.
But in CI deploy script how to run acceptance tests? These tests need to be run in browser in an already deployed build. Is there a workaround for that? Maybe run acceptance tests after build succeeds?
But then revert will be a pain.
You can parallelize the test jobs as advised in every CI/CD pipeline.
But in CI deploy script how to run acceptance tests?
For this you will need dedicated Test infrastructure, like available browsers on the server. After build step is successful - run all Test steps.
The parallel jobs can be setup like this:

TeamCity feature to send customised emails on test/build failure

I am using TestNG to run my Java/JavaScript test cases. For testing JavaScript modules, am using FuncUnit. The use-case is as follows:
TeamCity runs Gradle file to build and test all modules in a project.
Gradle invokes TestNG to run the test cases.
TestNG runs the Java unit test case. Inside this test case am using Selenium to open the FuncUnit test case HTML page in a browser. After the FuncUnit test case run is completed, I am using Selenium to compile the test results and store it in a Java instance variable. In case of detecting any JavaScript test failure, I am failing the Java unit test case using assetTrue().
Test failure causes build failure and TeamCity sends out emails to the users.
There is unwanted stacktrace in the email which we don’t want to send. We are only interested in the details which is stored in the Java variable (in step 3) and we can do System.out.println() and this variable data will be sent in the mail. If there is any other elegant solution where-in we can push our custom data to email without depending on Stdout statements, we are open to that too.
Also, I want this feature to be project specific. Our changes for one project should not affect the email templates of other projects. For your reference, I have attached herewith a sample email that was sent by TeamCity.
Am using TeamCity 7.1

Resources