I have around 200 testNG test cases can be executed through maven by and suite.xml file. But I want to convert these test cases into web service or any other similar webservice so that anybody can call any test case from there machine and will be able to know whether that particular functionality is working fine at that moment.
But what if no one calls the test webservices for longer time? You won't know the state of your application, if you have any failures/regressions.
Instead, you can use
continuous integration to run the tests automatically on every code push; see Jenkins for a more complete solution; or, more hacky, you can create your own cron job/demon/git hook on a server to run your tests automatically
a maven plugin that displays the results of the last execution of the automated tests; see Surefire for a html report on the state of the last execution of each test
Related
I would like to frequently run the tests I'm working on, UT or IT but, whatever I try, I see npm messages passing by, npm run webapp:build:dev, npm_install, webapp_test, and of course a bunch of .spec.ts tests being executed.
Right clicking/run even in a single JUnit test starts all this, which takes a while to execute.
So, what's the way, in a monolithic JHipster application, to run tests ignoring the frontend?
I created a project using cucumber to perform e2e tests of various apis I consume. I would like to know if I can run these tests through endpoints to further automate the application that was created.
That way I would be able to upload this app and would not need to keep calling locally.
You can do that if you create a Rest API with a get method which executes the test runner when called.
How to run cucumber feature file from java code not from JUnit Runner
But I don't recommend you to do that since what you are trying to achieve seems to me similar to a pipeline definition.
If you're in touch with the developers of these APIs, you can speak with them about including your test cases in their pipeline, since they probably have one in place.
If, for some reason, you still want to trigger your tests remotely and set it up by your own, I would recommend you to start reading about Jenkins. You can host it on any machine and run your tests from there, accessing from any machine to your jenkins instance:
https://www.softwaretestinghelp.com/cucumber-jenkins-tutorial/
If your code is hosted in any platform like github or gitlab, they already have its own way of creating pipelines and you can use it to run your tests. Read about Gitlab pipelines or Github actions.
I want to integrate TestRail with automated tests where I want to run test cases from testRail which calls the test cases in Jenkins and then writes the result back to TestRail itself.
In order to run test cases directly from TestRail, you'll need to first set up a UI script and a trigger script. The UI script will add a button that allows a user to kick the tests, and the trigger script will actually send some command to start the tests. I would note that you'll need to call out to some external test runner that can actually kick and run the tests.
In order to get the results back into TestRail you'll need to leverage TestRail's API. This will allow you to post your results back into the desired run. You can associate your results via test case ID's and place them in either a new or existing run.
I have set up an end-to-end component test in Junit. It tests that objects generated at application startup are received at the other end of my application before they are sent over the network. I assert that the the number of objects received are the same as those generated. To be clear, this is only testing within the single application component. The network is mocked out.
When I run this test in Eclipse IDE, I send 4 and receive 4. When I run the test from Apache Ant, I send 4 but only 3 are received.
Does anybody know what this could be caused by? The test is probably run quicker with Ant, but my application is single threaded, so I don't see how this would make a difference.
Thanks!
I have an application developed in Java that uses Arquillian for testing. The application has about 300 tests in all.
Is there an easy way to log the results of each test? The tests are not all in the same class of course. So, I am wondering if there is a way to easily show the test name and results without needing to add logging to each of the 300 tests.
I would like for the logging to be shown during the maven build, while it is actually running the tests, so that I can see the results in real time.
I did end up using the Arquillian recorder-extension library; however, it does not show tests in real time so I ended up forking the project and editing it to work for my needs.