Can I generate code coverage from deployments on azure? - azure

We would like to be able to deploy our code to azure and then run integration/acceptance tests on the deployed instances to validate the functionality, as using the emulator does not always give realistic results.
We would also like to have these tests generate code coverage reports which we could then merge in with the code coverage from our unit tests. We are using TeamCity as our build server with the built in dotcover as our code coverage tool.
Can we do this? Does anyone have any pointers on where to start?

Check out this video
Kudu can be extended to run Unit Tests and much more more using Custom Deployment Scripts.
http://www.windowsazure.com/en-us/documentation/videos/custom-web-site-deployment-scripts-with-kudu/

Related

Generate code coverage for integration tests

In the ML model which uses python3.6, flask restful, gunicorn (wsgi), nginx and docker, I do not have good unit test coverage but cover almost all scenarios in my integration and regression tests by invoking REST Api developed using flask restful. REST API is deployed into container.
I generated code coverage report using coverage i.e. https://pypi.org/project/coverage/ and the report is generated based on my unit tests. But, I also need to see if there is a way to get code coverage using integration and regression tests as well. Since API is deployed into a container, I am not sure how I can get code coverage using integration and regression tests because I invoke REST APIs for the same.
Please let me know if someone has solved this problem already ?

How do I get VSTS to find my NetCore unit tests with net Net Standard Azure Functions?

I have a build pipeline setup in VSTS that keeps reporting it cannot find my unit tests. The project is a NET Standard Azure Function (V1) but the tests are NET Core. I have tried updating the path to ..\netcoreapp2.0*.test*.dll but it still does not find the tests. Any ideas would be appreciated.
If I understood your pipeline correctly, I believe you're using incorrect step for testing .NET Core project.
In one of my solution I have following pipeline:
As you can see, there's a separate step for "traditional" unit tests and the new ones written in .NET Core. The selected step looks like this:
Thanks to this I am able to run my tests without any issues.

Need a Code Coverage tool for application in NodeJS

My Application runs on NodeJS and my Test Automation is in Java. I am looking for an appropriate code coverage tool.
Kindly excuse if inappropriate question. I am a beginner.
#AnshulG, I think you can not make a code-coverage report without tricks.
Code Coverage is a measurement of how many lines/blocks/arcs of your
code are executed while the unit tests are running.
You don't have unit tests, because the application written in Node.js, tests are written in Java.

Running Coded UI tests from MTM without a build?

I have created a few coded ui tests and linked them to the test case, and they now appear as automated and you can see the dll they link to in the test case details.
Now that I want to run the tests, MTM refuses to even start the test unless a build is defined.
However: I want to run the tests against a statically installed application in the lab environment. This is an application that I manually install, and I get this application already compiled, so no need to play around building it.
So how can I take the build server out of the loop? I don't need the application built or deployed, I'm already doing that.
All I want is the tests to run on the lab environment specified against an application that is already preinstalled.
It's asking you to define the build of the test solution, assuming that it's different from your application under test. The test assembly will be deployed to the test environment after you specify it in MTM. This article may help you with the specifics.
It is asking you to create a build for your Coded UI test solution. It requires that the tests be built so that it has something to execute when you run the tests. Assuming that your tests were recorded using your statically deployed application then they will test that same application.

Is it possible to integrate Jasmine into cruise control.net

Is it possible to automatically run a jasmine test suite as part of a cruise control.net build?
And If so how?
My server code is C# and I already had my CI server running lots of unit tests. So I added a unit test that uses Watin to launch a browser to run the Jasmine tests and check the results. It took a morning to get all the pieces playing happily together.
An alternative might be to investigate NJasmine -- I saw this was available on NuGet but didn't pursue this myself partly due to lack of documentation.
Also, if you're using ReSharper, you might like to look at their integration with QUnit: http://blogs.jetbrains.com/dotnet/2011/03/resharper-6-introduces-support-for-javascript-unit-testing/ (there's every chance they'll integrate it with Jasmine too). Although this is aimed at running JS UTs within Visual Studio, you might find it offers you a "hook" to run them from your CI server too.

Resources