How can I view a Cobertura code coverage report? - code-coverage

I have a coverage report generated with Karma / Cobertura.
It looks like this:
<?xml version="1.0" ?>
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
<coverage lines-valid="91293" lines-covered="22464" line-rate="0.24609999999999999" branches-valid="50346" branches-covered="3333" branch-rate="0.0662" timestamp="1478206709367" complexity="0" version="0.1">
<sources>
<source>/home/ubuntu/my-website</source>
</sources>
<packages>
<package name="core" line-rate="0.4032" branch-rate="0.2327" >
<classes>
<class name="ajax.js" filename="src/ajax.js" line-rate="0.4576" branch-rate="0.2778" >
<methods>
<method name="(anonymous_1)" hits="1" signature="()V" >
<lines><line number="7" hits="1" /></lines>
</method>
...
How can I use this file to view annotated code?

Related

tsung not sending or receiving any data

i have an api which i was load testing with tsung.All was ok. Now , i am getting no result using varibles data from file in load testing.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE tsung SYSTEM "/usr/local/Cellar/tsung/1.7.0/share/tsung/tsung-1.0.dtd">
<tsung loglevel="warning">
<clients>
<client host="localhost" use_controller_vm="true"/>
</clients>
<servers>
<server host="127.0.0.1" port="8030" type="tcp"/>
</servers>
<load>
<arrivalphase phase="1" duration="1" unit="minute">
<users arrivalrate="100" unit="second"/>
</arrivalphase>
</load>
<options>
<option name="file_server" id="ids" value="id.csv" ></option>
</options>
<sessions>
<session name="dummy" weight="1" type="ts_http">
<setdynvars sourcetype="file" fileid="ids" order="iter">
<var name="uid" />
</setdynvars>
<request subst="true">
<http url="/api/v1/locations?user_ids=%%_uid" method="GET" version="1.1" >
<http_header name="Content-Type" value="application/json"/>
<http_header name="RLS-Referrer" value="vivasoftltd.com"/>
</http>
</request>
</session>
</sessions>
</tsung>
this config file.
and the id.csv is
1
2
3
4
5
6
7
now generating report showing
size_rcv is equal to 0 !
size_sent is equal to 0 !
And the report.html is showing all empty and all errors.
How can i solve this
Your dynamic variable substitution is incorrect inside your request.
<http url="/api/v1/locations?user_ids=***%%_uid%%***" method="GET" version="1.1" >
Please check this link for Tsung documentation regarding Dynamic variables.

Adobe Animate when publishing apk. Error creating files. Namespace is invalid in the application descriptor file.

I have an issue with this code. Cannot fathom what is wrong
Does someone have a clue?
Adobe Animate when publishing apk. Error creating files. Namespace is invalid in the application descriptor file.
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<application xmlns="http://ns.adobe.com/air/application/26.0">
<id>NorskRadioUtenAir</id>
<versionNumber>1.0.0</versionNumber>
<versionLabel/>
<filename>NorskRadioUtenAir</filename>
<description/>
<name>NorskRadioUtenAir</name>
<copyright/>
<initialWindow>
<content>NorskRadioUtenAir.swf</content>
<systemChrome>standard</systemChrome>
<transparent>false</transparent>
<visible>true</visible>
<fullScreen>false</fullScreen>
<aspectRatio>portrait</aspectRatio>
<renderMode>cpu</renderMode>
<autoOrients>false</autoOrients></initialWindow>
<icon/>
<customUpdateUI>false</customUpdateUI>
<allowBrowserInvocation>false</allowBrowserInvocation>
<android>
<manifestAdditions><![CDATA[<manifest>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <application>
<meta-data android:name="com.google.android.gms.version" android:value="4323000" />
<!-- should be android:value="#integer/google_play_services_version" -->
<activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
</application>
</manifest>]]></manifestAdditions>
</android>
<extensions>
<extensionID>com.pozirk.ads.AdMob</extensionID>
</extensions>
</application>

Parse test name from testng xml to ant build.xml

There are many testng.xml files which I run via same build.xml using command line option.
I want build.xml to parse the test name from each testng.xml that is passed via command line option
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="tests" verbose="1" threads="10" preserve-order="true">
<test name="first" preserve-order="true">
<classes>
<class name="com.etc.first">
<methods>
<include name="First" />
</methods>
</class>
</classes>
</test>
<test name="second" preserve-order="true">
<classes>
<class name="com.etc.Second.java">
<methods>
<include name="Req" />
</methods>
</class>
</classes>
</test>
</suite>

Nuget Error 'ns:package/ns:metadata/ns:id' in the XML file was not found

When running nuget in my build to create a package I get:
'ns:package/ns:metadata/ns:id' in the XML file was not found
my NSPec which was generated from
nuget spec [Application Name]
which returns
<?xml version="1.0"?>
<package >
<metadata>
<id>E.Commerce.Site</id>
<version>1.0.0</version>
<authors>administrator</authors>
<owners>administrator</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>description</description>
<releaseNotes>release of the package.</releaseNotes>
<copyright>Copyright 2013</copyright>
<tags>ESITE</tags>
<dependencies>
<dependency id="SampleDependency" version="1.0" />
</dependencies>
</metadata>
</package>
xmlns is required to run through this tool and is not included when nuget.exe generates the NSPEC
notice:
xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd>
<metadata>
<id>E.Commerce.Site</id>
<version>1.0.0</version>
<authors>administrator</authors>
<owners>administrator</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>description</description>
<releaseNotes>release of the package.</releaseNotes>
<copyright>Copyright 2013</copyright>
<tags>ESITE</tags>
<dependencies>
<dependency id="SampleDependency" version="1.0" />
</dependencies>
</metadata>
</package>

F# NLog config file

I'm trying to use NLog in an F# console application, I've managed to get it working using a configuration section in App.config however I can't get it working using a stand-alone NLog.config file. My NLog.config file is in the app route, just under App.config and the contents are:
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" throwExceptions="true">
<targets>
<target name="stdFile" xsi:type="File" fileName="c:/temp/compliant.log"/>
<target name="display" xsi:type="OutputDebugString"/>
</targets>
<rules>
<logger name="compliant.mail.*" minlevel="Debug" writeTo="stdFile,display" />
</rules>
</nlog>
What am I doing wrong?
Also, intellisense isn't working for the xml even though I have included the xsd. :(
In your project, in the Properties for NLog.config, do you have NLog.config marked as "Copy Always"?

Resources