I have a project that was version 0.2.7 and generating component tests as unit tests. My new projects create integration tests by default. Is there a way to change it over?
This is the default behavior now and as far as I know, can't be overwritten, as components should be run in isolation. However, you can simply generate a unit test with:
ember g component-test your-component -unit
If you want to read up on why you should try integration tests, I found this article helpful:
http://alisdair.mcdiarmid.org/ember-component-integration-tests/
Related
My project is composed of several DLLs that I must test with different unit tests. I generate an XML file for each of the tests then I transform them into a JUnit format to be read by Jenkins. It works very well.
On the other hand, the test results are all in the same topic on the Jenkins interface and I would like to separate them for each DLL. It is for a more practical aspect for the visualization of the tests. I haven't found the solution yet. That's why I'm asking you if there is a solution for this problem.
I tried several plugins like JUnit or Warning NG. But the result remains the same. The JUnit plugin puts all the results in the same section and makes no distinction and the Warning NG plugin fails to parse the XML report to display it in Jenkins.
Cypress allows for GUI testing in browser as well as Unit Testing using the NodeJS installation version.
But I was wondering if the standalone version, aside for UI testing, it also allows for Unit testing.
I don't seem to find any information in regards.
I am working on a website project that uses plain HTML + JS, meaning that there is no NodeJS involved nor anything similar.
I need to write some Unit tests for it.
If I was to use Jasmine, that provides a simple inline script linking such as <script type="text/javascript" src="lib/jasmine-{#.#.#}/jasmine.js"></script>.
But I'm not sure how it is done in Cypress, or if it is even possible.
It would be handy to be able to do Unit test and UI test with the same testing library.
I want to run all the ignored tests in my solution in a different build configuration in TeamCity.
I didn't see any explicit why to do it in the build step configuration page.
Can it be done?
The Ignore attribute is the wrong thing to use here. It should be used for tests you do not wish to run at all. Try using Categories instead. TeamCity has two properties you can set within an NUnit build step.
NUnit categories include and NUnit categories exclude control which tests will be run.
How did you mark your tests - your question is not quite clear in this point? Did you use the Explicit or Ignored attribute? If the latter then these tests will not run at all.
As an additional note, we manage our project builds with Maven.
Let's say we have three GWT modules, only one of which has an entry point. The other two modules are inherited by the module containing the entry point.
We practice MVP and strive to keep the majority of our testing as normal JUnit tests, but some integration tests require us to use GWTTest. We keep these to a minimum.
We would like to keep the actual tests with the modules containing the code they are testing. My thought was to ensure that maven only executes JUnit tests for the sub-module builds. The GWTTests in the submodules would be rolled up into a test suite. Then, the entry point project would contain a GWTTestSuite which rolls up the submodule test suites along with and other GWTTests that the entry point module may have.
At this point, my problem is that the entry point GWTTestSuite can't resolve the tests from the submodules ("no source code is available........did you forget to inherit a required module"). I've tried creating the test-jars for the submodules and adding them as dependencies to the test scope, but when GWT is executing the primary GWTTestSuite, it can't find the submodule test suites (or their underlying gwt tests). I can see the GWTTests in the .m2 repo test jars.
So, how do I get the GWT compiler to "see" the submodule tests?
Update:
I have not yet been able to figure out how to do this. The cleanest thing I can manage is to keep the normal JUnit tests co-located with the submodules, but keep all GWT Tests for all modules in the main module.
What are the steps to get Team Foundation Server running unit tests when a given build runs?
What are the caveats / pitfalls / workarounds a dev or sysadmin should be aware of when setting up a TFS server to do this for the first time?
What are common troubleshooting steps for unit test problems during builds?
it depends on which version of TFS you are running, so I will assume it is 2008.
Firstly, you must have Team Edition for Testers installed on the computer that will act as your build agent, as stated in How To: Create a Build Definition
There are a couple of ways to tell Team Build to run tests for your build.
Unit tests can be run from a defined Test List within the Solution being built. This list is referenced by the build definition and all tests within the chosen list(s) are executed. More info here
WildCard test exectution is also available by defining a wildcard mask (i.e. Test*.dll) that instructs Team Build to run any tests present in assemblies that match the mask. This is done when defining the build definition as well.
Things to note:
If you intend to use the wildcard method and want to enable code coverage for your test configuration, you must add the following to your build definition file to enable it.
<RunConfigFile>$(SolutionRoot)\TestRunConfig.testrunconfig</RunConfigFile>
See my previous question on this for more info here
If you don't want to use test configs (A Pain in the ass to manage) just run all the test in a .dll by adding this to the build config:
<ItemGroup>
<TestContainerInOutput Include="MyProject.UnitTests.dll" />
</ItemGroup>
The whole process is smooth and fairly simple. You can inspect the unit tests that filaed on the build server by opening the test result file locally (a bit of a pain) but generally you'll just run the unit tests locally and you can see the results immediately.
If you are used to NUnit, you may opt to sort the tests by classname, it gives a similar view.
Careful with code coverage, it makes complete copies of your binaries on compile. If your binaries are sufficiently large and you compile often, it will eat through drive space quickly.
http://msdn.microsoft.com/en-us/library/cc981972(v=vs.90).aspx
I like this defination as it gives you a complete 'walkthrough' from
Creating the Project
Creating the Unit Test Project
To configuring Team build to use it Unit Test