How to do code coverage for a remote repository deployed in Jboss server using Emma? - testing

Here is my scenario.
I have a code base, which is built and deployed as EAR on jBoss server.
I have a separate testing framework.
Now I want to run the classes of that EAR using my testing framework.
The test cases are written in TestNG.
Also I want to know the code coverage of the EAR.
I have used eclEmma to do code coverage for Junits, it was simple as the code and tests are at same place.
How can I use Emma in the case of remote code base. Please help.

EclEmma is Eclipse plugin based on JaCoCo - Java Code Coverage Library. JaCoCo provides various ways for collection of code coverage. In particular you can attach it to the server as a Java agent and request information about coverage remotely. And even import and show it in Eclipse using EclEmma.

Related

How to merge selenium automation code with application development code base in same repo

I have to merge my test automation code base with my application development code base in same repo, i have 2 different pom's- one for development code and other for automation testing code.
Dependencies used in development code are not there in testing code and vice-versa. Currently i have merged both the pom's and able to run automated tests on CI/CD pipeline.
But need to have separate pom's for both of them as it might take more time for dev code to build/deploy on CI/CD pipeline because of dependencies present in testing pom.
Please suggest the efficient way to do this?

Source Control for Selenium Tests written in Java

In my company, I have plans to introduce Web Automation using Selenium WebDriver and Cucumber JVM using Maven builds.
Since the developers write their code in C#, they are all using TFS for source code repository and recommending the QA team also to use TFS to maintain my tests written in JAVA.
These are the questions I have got in my mind:
QA team will use IntelliJ IDE for writing Selenium tests in JAVA. Is IntelliJ compatible with TFS? Or is it a pain to configure it to work with TFS?
As we will move towards TDD very soon, we have to setup CI server as well.
Is it possible for me to run Selenium Tests triggered from TFS or do I need to use a separate CI server like Jenkins or Teamcity?
Does maven build work smoothly with TFS?
We have to adhere to stringent ISO guidelines for maintaining the source code. If I were to recommend source code repositories like github, can I ensure that the code is still secure? Is it difficult to setup the security in github?
Answering your questions regarding TFS:
IntelliJ IDEA supports TFS up to TFS 2015. Check:
Visual Studio Team Foundation Plugin for IntelliJ and Android Studio
Using TFS Integration
TFS supports CI build. After you've deployed a Windows build agent or an Xplat build agent, you are ready to define a CI build that compiles your Java app with Maven whenever your team checks in code.
Yes. Check:
Build your Java app with Maven

Clover code coverage of classes deployed in WebLogic server

I am struggling to get coverage of classes that are deployed into WebLogic server. I have them surely instrumented. The setup is that I have some classes in jars and some in unpacked form. When tests are executed against running application (some automated clicking), I can see some coverage for the classes packaged in jar, but I have no coverage for the unpacked classes. However, clover knows about those classes, I see them listed in clover database, but having no coverage.

sonar integration test coverage

We have seperate integration test project which fires the integration test cases on different modules . At present we do not have unit test cases within each module. We would like to ensure that the integration test covers most of the domain functionality.
Since we have the integration tests in a different project , Sonar always reports the test coverage as zero for the modules under test.
Is there any way to have the test coverage reported on a project , when the actual test is run from a different project
Thanks
You should be able to achieve what you want by reading the Code Coverage documentation page on the wiki. Most notably, you'll be able to use the following sample project to see how it works:
IT JaCoCo Sonar Runner sample project
Basically, you have to run your integration tests first using JaCoCo to generate the coverage report (jacoco.exec) and then you reuse this report during the SonarQube analysis.

Instrumentation testing in Android Studio

I'm new to testing and currently trying to write some tests in Android Studio. I have a sample application module and now trying to figure out, whether the instrumentation test needs to be a module of its own or whether the tests should go inside the src folder... I have read contradicting information on the web. If anyone had a sample, that would be great!
With eclipse ADT plugin and older version of the SDK it was a requirement to put the integration tests in a separate module.
With the gradle build system and android-studio you should be able to put your integration tests in src/test/java and running them from the IDE or gradle command line without pain.
That's why you find contradicting information on the web.
Here is the reference
This post contains a very good explanantion on how to do the integration testing in Android Studio:
How can I create tests in Android Studio?