When using Robolectric, Gradle Build Running takes a long time. How to solve? - gradle

I've been started the unit test for 19 min.However the Gradle Build Running is still running, and Android Studio shows the test is running.
It's my first time to run unit tests using Robolectric, how come it takes so long time?
It stopped here in the Build view.
enter image description here
I've been tried these below.
enter image description here
enter image description here
How can I run unit tests faster?

Related

How to run a single test with Quarkus live reload

Our test suite takes 5 minutes to run (mostly due to Kafka containers being setup before each test I presume).
When running mvn quarkus:dev and working on a test, I don't know how to re-run only a single test, the one I'm working on.
If my test is broken, and is the only one broken, then it is fine. But as soon as it turns green, quarkus will not run it again if I change the test code.
If I am making big changes, quarkus will run all broken tests and I cannot clearly follow the result of the test I am working on.
I can use mvn verify to run a single test, but the compilation time and application startup times makes it too boring and breaks the mental flow.
How can I tell quarkus to run only some specific test while running?

TeamCity not showing the latest run result

I am new to TeamCity. I am facing this issue. I have several tests running as part of a system test. Some of the tests after completing the run, shows result of an earlier day. Please see the image in the link below:
As you can see, it shows it was ran 3 days ago with a build number 164. But if I go to the log of that test, I can see the correct info
If I run the same test again, it shows the build is outdated
But even after completing this run, it shows the same result as in the first image.
Can someone please let me know what I have to do to fix this?
Maybe you are generating history builds, you can check this article in the official Team City documentation.
History builds

Cypress-testrail-reporter creating separate test runs for each test

I have managed to get Cypress to report results into TestRail using the cypress-testrail-reporter. However, when I execute a test run (only manually at the minute using npx cypress run) the results of each test are logged as separate test runs. They are currently showing like this:
Screenshot from my test runs page on TestRail
I want the results from each time I execute my test suite to appear as 1 run rather than 5 different runs as shown in the screenshot.
I've bumped into the very same issue. So I've started to use Cypress-accumulative-reporter which fixes this issue.
This reporter is not perfect btw from time to time it does not publish the last spec executed, so I've created an empty spec file to run at the end... not clean workaround but it works.
https://www.npmjs.com/package/cypress-testrail-accumulative-reporter

Fastlane storing screenshots AND test reports

I have fastlane currently set up to run my UI Tests for my ios app in Xcode. Currently, I have a snapshot lane and a scan lane set up. One produces for me the screenshots I want as I run my UI Tests, while the other produces a xcpretty test report of which tests passed/failed.
My current issue is that to get both the screenshots and the report, I need to run both the scan and the snapshot lanes, which means I run the tests twice. Is there a way to only run the tests once while still producing both reports?
I have been looking for options in snapshot to produce a test report along with the screenshots, but I can't seem to find it if it exists.

Running iOS project unit tests from Jenkins does not produce any output

I have setup Jenkins with git and Xcode plugins so that I would be able to build an iOS project on CI machine. However - I don't seem to get any unit test output in the console. I see the compilation messages (for implementation files as well as xibs), I see the build of test bundle, but no "test passed" or "test failed" messages. Running unit tests from Xcode produces all the needed output. What am I missing?
Your problem might be caused by several things. To approach the solution there are some things you need to know:
How do you run Jenkins? Did you use the Jenkins Mac installer from http://jenkins-ci.org?
Is Jenkins running under your user account? Or is it running as someone else? Is it running as a launch daemon?
Do your tests require access to WindowServer or are they completely happy only the commandline?
What is going on in your machine?
When Jenkins runs the build and the unit tests do not run, open Activity Monitor, show the process tree, check the sub processes of Xcode and if you find a process that looks like your unit test and then sample it (either with the Sample button in Activity Monitor or the "sample" command line utility). What is the process doing based on the samples?
If your unit tests require access to WindowServer and you are running Jenkins as a launch daemon, you might be interested in https://github.com/stisti/jenkins-app
Normally output like "Test x passed" or "Test x Failed" is due to the testing suite outputting to the console. When I call MSTest, I am calling via the cmd and the output is relayed back through jenkins. It sounds like you need something to read the output xcode is making and display it back to you. Sounds like you may not be able to do this in real time unless there is some sort of output goes to console flag you are not setting.

Resources