I have a .dll file and I want to test the code with NUnit testing.
Could you give me any example about how to do that?
Thanks.
There are a lot of ways to test F# code. Take a look at the section "Community Projects: Testing Tools" on F# foundation page: http://fsharp.org/community/projects/
Specifically for using NUnit FSharpTest template is very useful https://visualstudiogallery.msdn.microsoft.com/a52388eb-e1d3-4900-a25a-d18c8d23a1f3
Related
I have a scenario like this - Application written in hybrid languages (Python, C++ and Java majorly). There are around 100 test cases written in Robot framework to test the application. Now I want to see code coverage of my application. Is there any tool that can work in such scenario?
Thanks in advance.
The same way you would do outside robotframework: Using external code analysis tools. Let me elaborate.
In Python, you can use tools like Coverage (https://pypi.org/project/coverage) to run your testing suite while gathering coverage data. For example, if you usually run your robot test suites using:
robot suites
(supposing you have a "suites" directory with your .robot files) then you would run robot as a Python module over Coverage like this:
coverage run -m robot suites
And you could get your report with:
coverage report
You'll probably need to filter the report (--include option) if you're only interested in code inside a directory. For example, for a directory "myproy" you would do:
coverage report --include *myproy/*
You could use a similar strategy with other Python test coverage tools as long as you figure out how to tweak their execution command to run robot as a module. The same holds for C++ and Java code analysis tools; For example, check the following link for a guide that uses Java with JaCoCo and Maven: https://www.cnblogs.com/z1500592/p/6676646.html
Is there a Visual Studio Code extension that will write cucumber step definitions?
For example, with IntelliJ if I type
When I login as "fred" with password "barney"
into a feature, then press alt-enter on the undefined step, IntelliJ will auto-generate
When(/^I login as "([^"]*)" with password "([^"]*)"$/) do |arg1, arg2|
pending
end
in one of my step definition files.
Can Visual Studio Code do this also? (I do have Cucumber Full Support installed; but, it seems to only autocomplete existing steps.)
So far as I see Cucumebr VS Code extension does not provides auto-generation/update of test steps as IntelliJ or SpecFlow.
Yes, use the SpecFlow plugin from SpecFlow and it will automatically generate all your cucumber feature steps.
Try Jest cucumber for auto-generation of code from feature file-
https://marketplace.visualstudio.com/items?itemName=Piotr-Porzuczek.jest-cucumber-code-generator-extension
There is Cucumber (Gherkin) Full Support plugin. It has auto-completion of steps, as well as many other features.
Do you have some opinion for code coverage in Hudson.. Now i have build with Msbuild and MSTest and that's work.
But for code coverage, i think i need some help. I have searched that somebody use nCover another with Emma. Which one is better and more easier ? And maybe reference to help me.
Best regard,
Are you .NET (NCover) or Java (Emma) or both?
NCover should work with Hudson but costs
Open Source projects exist look for PartCover and more recently OpenCover.
All three .NET tools support command-line and as such they should integrate with Hudson.
We are currently using dotCover by JetBrains. It's cheaper than NCover and it integrates well with Visual Studio. You don't have to use a separate application (NCover Explorer) to view your code with the covered/uncovered highlighting, which is great.
The command line version of dotCover allows you to create XML files of the analysis and you can parse the XML via <XmlRead> (in the MSBuild Community Tasks library) to parse the output.
It takes a while to get set up properly, but it works.
I just added a Silverlight Unit Test Application (project) to my Solution to test my SL4 App.
Also added a Silverlight Test Class to that same project and created a simple test.
I'm using SL4, VS2010 and TFS2010 automated builds.
I'm not being able to associate that test to one of my test cases. Any reasons why?
Though, the associated automation test window detects unit tests belonging to a standard SL4 Test Project (included in the same solution).
Thank you,
Nuno Senica
Read the follow - article
Seems it should help you..
Pay your attention to Silverlight Unit Test Framework too.
How to do testing and is there something similar like Rack::Test with ruby frameworks?
You can use Specs, ScalaTest and JUnit (and any other java test framework), theres some examples on the new wiki.
Read this!
I don't know much about ruby, so maybe don't get your point. But what about Jitr?
Jitr (pronounced "jitter") is a JUnit
Integration Test Runner.
It allows your web application
integration tests to easily run
against a lightweight web container in
the same JVM as your tests.
You can use it with JUnit 4's #RunWith annotation. In Scala: #RunWith(classOf[Jitr]).
This may be of help, it's on Lifts wiki pages. There are examples using Junit, Scalatest and and Specs.
How To: Unit test lift snippets with a logged in user