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
Related
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
I am using a cucumber test with multiple features file for testing spring boot project, test run locally passed and when go to Jenkin build it gets failed but when I am trying multiple time build(3-4 times) its get succeed and build pass without doing any changes.
I don't understand what wrong I am doing is there any data related problem or Jenkin configuration problem or multiple feature file problems.
please guide what I am missing?
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.
I want to run my protractor test (remote server) using teamcity project.
I'm new to teamcity. I want to call the scripts from teamcity.
can I just refer the script at its location without having 'checkout directory'? since I don't do checkout, I just want to run the scripts and control it remotely.
what is the best way to combine protractor tests with teamcity? the target is to make it run on hourly basis and use the results - send it on mail, run again if failed etc.
thanks.
You can run test from teamcity targets without checking out any code. You can leave the vcs settings as blank if you want to .
Teamcity targets can automatically send email for test failures to individuals or groups. Normally emails are sent to developers who have commits in a particular run, however since you are not tying in any VCS to your build step, you can sign up a group of people who will receive a mail whenever tests fail using the "Notifications" tab
I have a bunch of jmeters that I would like to run in an automated way.
Are there any available solutions for this?
Also is it possible to invoke jmeter tests in a particular location from java ? I would happily write a web app for running them from there.
JMeter can be invoked in multiple ways:
Command-line mode (like from shell script)
Apache Ant Task
Apache Maven Plugin
Jenkins Performance Plugin
Execution from Java code via JMeter API
See 5 Ways To Launch a JMeter Test without Using the JMeter GUI for extended information on above and more. It also contains some code snippets on existing .jmx scripts execution and even creating new test using only API.