1

I am trying to generate bullseye coverage report after doing blackbox testing. We have an appliance on which we do black box testing, however there is no way to compile libraries on that, so I am following below steps to generate report.

However I am getting 0% report. There is no change in coverage file, it's not getting updated.

  1. compile all libs with bullseye
  2. copy and replace original libs on appliance with this bullseye libs
  3. copy cov file, and make sure ithas proper rights (i.e. chmod 777cov_file.cov)
  4. export path in /etc/environment, also created sh file in /etc/profile.d and set path in it.
  5. run black box tests.
  6. copy cov file to dev machine and generate report.
Gaurang Shah
  • 11,764
  • 9
  • 74
  • 137
  • I have replaced all the libs on the appliance with libs compiled with bullseye in Step 2. and have copied this coverage file also on the same appliace in the step 3. I am not able to understand why it's not working ? does bullseye generate any log ? – Gaurang Shah Dec 17 '14 at 13:02
  • Does the execution of step 5 alter the file time of cov_file.cov (time when the file has recently been changed)? – TobiMcNamobi Dec 17 '14 at 13:06
  • ohkay. That's the actual issue. coverage file is not being updated. So I searched a bit and I though problem is coming as I am setting COVFILE in .bash_profile, however none of my test case is going to open terminal. So I set this variable in /etc/environment. I also create sh file in /etc/profile.d and set variable in it. However it's still not working. – Gaurang Shah Dec 17 '14 at 13:56
  • Is it possible to make calls to the libs under test without using that black box? Just to see if coverage is measured in a more local environment. – TobiMcNamobi Dec 17 '14 at 14:27
  • @TobiMcNamobi. We have two automations. One is more like white box which makes direct call to libs. If I run that, I am able to get the coverage. For that I simply export COVFILE variable from same terminal from which I am running the code. However even after setting same variable in /etc/environment and /etc/profile.d I am not able to see any report for Blackbox testing. – Gaurang Shah Dec 17 '14 at 15:08
  • When you want to run the compiled unit tests you also have to export the COVFILE before that in the environment you run them. I also export some things to LD_LIBRARY_PATH but I can't check right now if it is strictly related to our project... – Lilian A. Moraru Feb 06 '15 at 05:46

1 Answers1

0

I solved the above problem by setting the environment variable from one of the demon file.

The possible reason it was not working is, I was setting environment variable in profile which requires shell, however my automation was not using shell.

Gaurang Shah
  • 11,764
  • 9
  • 74
  • 137