I have some question regarding the NUnit test project and very new with NUnit.
For every wpf project there should be a test project or a single test project for a solution?
The test project will be class library project?
Thanks in advance. I am waiting for your quick response
Your first question is addressed here already: Which is better? Unit-test project per solution or per project? In a nutshell, there's no hard and fast rule, just be consistent and when possible try to mimic how you expect your libraries to be used.
For your second question, yes, it should be a library. It won't have anything other unit tests -- which are just classes with methods -- so there's no reason to make it an application or any other type of project.
Related
Please bear with me if this is a silly question. But thought of getting an idea.
We have a very sophisticated Selenium Webdriver-Java framework. But now some parts of our application is being implemented in AngularJS. We would like to use protractor for test automation. But we have some API in the existing framework which we would like to reuse. Is there a possibility to do so or do we need to re-write all the existing API in protractor?
Thanks
Not probably the answer you are looking for. But, this can give you some hope.
Unfortunately there is no protractor java port at this moment. I use Selenium C# and my project started using some Angular recently. And, fortunately, there is a Protractor-net project done by some great people to accomplish same thing you are struggling with. I must say, if your project is big enough to leverage some time to write a java port for protractor you can follow this project easily. It's not that extensive. I am personally using it and started writing about this on my blog
Some one is trying to develop jProtractor - An angular/protractor implementation for Java Selenium API. https://github.com/caarlos0/jProtractor
This is still under development(not in a position to use yet), but this could be the right tool for people who are in similar situation as me.
How to add tests like karma/jasmine to existing Ionic project? I know that there are some ionic generators that also add some test stuff...
But is there something similar for existing projects?
Thanks for any help!
Yes, there are couple of good generators. The most popular one is generator-ionic. It's a Yeoman generator and it has a build-in setup for static code analysis, running unit tests and checking code coverage. Another good alternative is generator-mcfly. It also include infrastructure for running tests and some more UI components.
in qooxdoo desktop you usually have to develop using the SDK and then "build" your app.
Is there a way to generate something like a qooxdoo.js file with the whole library inside so that you can script script it as you like (like jqueryui or dojo)?
Actually it could be nice to have every widget loaded at runtime like dojo's require("dojo.button") but both the approaches would be nice, just avoiding the build phase.
I hope the question is understandable :)
Thank you everybody!
Don't use the output of the build job to run your code as you develop - as among other things - will minify your code and make debugging very difficult.
If you want to code freely without needing to rebuild when you reference new classes then source-all is the build job for you.
In the root directory of your application, type:
python generate.py source-all
If will include the entire framework in the HTML file generated (you'll find it under source/index.html). This would work well if you are composing the UI from scratch and referencing many new qooxdoo widgets with each browser refresh.
If you add a completely new class of your own, you will need to run the source-all job again to include it.
I use the source build job however for a few reasons:
Habit: source-all didn't exist when I started using qooxdoo
Speed: You can notice a bit of lag it when you refresh the browser to view
your app
References: For a mature app, enough of the framework is
included in the application and its rare to add a new reference and
when you do, its probably in a new class of your own which would
require a re-run of the source job anyway.
I suggest you also look at Default Action Jobs as all the possibilities are explained in detail. Hope this helps.
Please check that thread for a detailed answer: http://qooxdoo.678.n2.nabble.com/Using-qooxdoo-desktop-without-having-to-build-it-td7585015.html;cid=1387453759247-228
important requirement: support running the tests in the Nightly Build of the TFS.
p.s -
Those I know are NUnit, and Silverlight testing framework. don't know which of them is suitable or preferred for my needs.
NUNit will work for class libraries. Just create objects, call functions and use Assert functions to test if actual = expected.
What is contained in the Silverlight libraries? One limiting solution is to convert them to Portable Class Libraries. These could then be referenced from ordinary Test projects.
I'm sorry if this appears elsewhere, it may be that my Google-Fu is failing me.
I'm in the process of reading Roy Osherove's The Art of Unit Testing and am thrilled to be able to start doing some Test-First work on my current project.
Roy's book uses NUnit as the basis for it's training. I find myself in the position of needing to use MSTEst in VS 2008 Pro along with the Silverlight Unit Test Framework to do our testing.
Can anyone point me to a good tutorials and references entries for using both of these tools?
Cheers,
Steve
AFAIK, the test class attributes for MSTest are identical to that of NUnit. You should be able to use Osherove's book as a guide without too much impedance mismatch.