Testing Meteor Packages - Alternatives to TinyTest? - unit-testing

What are the current options for testing custom-built Meteor packages? Is there anything out there other than the built-in TinyTest?
Found this question from a year ago, but my question is specifically about testing Meteor packages, not your core app.
Has anyone used Laika for testing their own packages?

Meteor's testing support is quite in flux at the moment (June 2014). I imagine most people will stick with Tinytest until the community develops a better solution that supports better UI tests and end-to-end tests.
https://github.com/xolvio/velocity is trying to unify a bunch of testing frameworks to have Meteor support. You may want to check out their progress at https://groups.google.com/forum/#!forum/velocity-core.

Velocity is now the officially sanctioned testing framework for Meteor, and there's a book about it - Meteor Testing.

Related

Adobe AIR mobile applications unit testing integration tests test automations

We are developing mobile games based on Adobe AIR and stage3D technology.
Is there any possibility to do unit tests, integrations tests, UI testing in such applications?
Are there any continues integration tools? Jenkins plugins or anything else?
After some researches we've found several tools for AS3 Unit testing but most of them are supposed to be used with FLEX apps.
Thanks.
Everything supposed to be used with flex - can be also used with pure as3 (of course I'm not talking about flex-specific libraries/framesworks, but most of them like Robotlegs or Parsley are pure-as3/mxml compatible).
So you can freely use Apache Flex compiler with Maven/graddle+flexmojos for CI, flexunit for unit testing (FlexPilot for UI tests, but not sure if it is ready-to use library for AIR, anyway it is open source, so you can adapt it to AIR)

Need suggestion for unit testing in Vapor using Swift 3.0

Do we have any unit testing frameworks in Vapor?
I am looking dependencies/framework which will help to do the Unit testing some of my web services and methods in easyway.
I've tried following solutions.
http://seatoncode.com/unit-testing-vapor/
https://medium.com/#tullio.sebastiani/unit-testing-vapor-toolbox-v-1-0-1-projects-c59a056c3b9b#.qf0kl1pfo
Regarding testing frameworks, I'm quite happy with Apple's XCTest, but if you're looking for something different, I recommend Quick.
If you also want to test the front-end, there are several solutions out there, and choosing one, in my opinion, depends on what front-end framework you pick, if any.
Anyway, I see you found articles on how to configure Vapor for testing. In this post I do something similar, but also I made a template to create new apps already set for testing. You can find it here.

VS 2013 MSTest vs nUnit vs xUnit

I realize there have been a LOT of questions on this topic but somehow I haven't found one that addressed my needs.
My team is looking to start automated Unit testing our application. We have never done it before and nobody on the team has much experience with it. I have been asked to research and find a framework for automating our Unit Testing. So far, I have narrowed the choices down to MSTest, NUnit and xUnit.
All across the internet, I read negative reviews about MSTest but it seems the most convenient tool to me for our purpose.
1) Our application is .NET
2) We use licensed VS IDE for our development across the team.
3) Source Control is Team Foundation Server 2010
4) We plan to integrate CI/CD as part of our software delivery process.
I feel that MSTest integrates right into this setup and provides the cleanest interface for us to work on. Is there a significant advantage with NUnit or xUnit over MSTest that we should consider?
I am biased because I work on NUnit, but the advantage of NUnit or xUnit is that both frameworks offer more functionality like data driven tests, parallel execution and a host of advanced features.
That said, there is nothing wrong with MSTest especially if your team is not very experienced with unit testing. It is well integrated with Visual Studio and with TFS, so adding tests is fairly painless. Both NUnit and xUnit integrate well too, but they may require more setup.
Go ahead and start with MSTest. It is an easy introduction to unit testing. If you start running into some of the limitations of MSTest, then it is a fairly easy migration to NUnit or xUnit. For simple cases, it is just a matter of changing your NuGet packages and then find/replace the attributes.
When it comes to choosing between xUnit and NUnit, both are great choices but each has a different philosophy. NUnit tends to be more flexible and allows for a range of testing styles and can be used for integration tests. It is however flexible enough to allow you to shoot yourself in the foot and allows you to write tests that purists would frown upon. NUnit leaves the choice up to you.
xUnit however tends to be a bit more opinionated and pushes you towards the 'pit of success' with unit testing. In my experience, it is great for green field projects, but it can make testing some poorly architected brown-field projects difficult without refactoring.
In the end, you can't go wrong with any of these test frameworks.
I would like to add one negative aspect of XUnit.
It does not have even a basic documentation, nothing beyond "Get Started". No API, nothing.
Here is a brief Analysis of the 3 Frameworks and ranked by color.
Legend of the Coloring:
MSTest it is good only because it is simple and integrated into Visual Studio and it comes from Microsoft. Its not flexible enough and not very extensible. But more than just a unit test framework, it also supports Integration tests, Web (load) performance tests. The other 2 are pure Unit Test Frameworks. So I would say MSTest is "Jack of all Trades, Master of none."
NUnit is my choice because its been the best consistently long enough. It is more flexible and simple with very good user base, documentation and community support.
XUnit is least of my choice because it follows a slightly different style and personally I do not see much advantage over NUnit. In some cases you will need to do some refactoring your code to fit into the test cases. But this is just my opinion as there are many who prefers XUnit.
I have listed down the comparisons in two categories:
Framework:
Implementation:
The source of these comparisons

How do I unit-test a meteor application?

What's Meteor's story with respect to unit testing?
The example videos look great for building prototypes but I haven't seen any indication of how to write tests for it.
For testing meteor packages, see Tinytest.
The testing story as a whole is captured on the official Trello board.
Take a look at documentation of Laika testing framework :
http://arunoda.github.io/laika/
Screencast with introduction to Laika done by its creator - Arunoda Susiripal:
http://www.discovermeteor.com/2013/06/06/testing-meteor-apps-with-laika
My guess is that you would use velocity + jasmine-unit packages.
Velocity had been selected as the official testing framework for meteor 1.0. The announcement has been made in the last meteor devshop (june 2014).
Packages developed with velocity:
velocity (the test runner)
jasmine-unit (jasmine syntax)
mocha-web-velocity (for testing collections)
velocity-html-reporter (view the tests in the browser)
About the usage of tinytest, once you have watched the screencast proposed by Jeff Foster, and understood the idea, you may want to take a look at the APIS of both tinytest and test-helpers packages.
For now the only documentation available for tinytest is at the bottom of the tinytest.js file
https://github.com/meteor/meteor/blob/devel/packages/tinytest/tinytest.js
The list of the helpers made available by the test-helpers package can be looked at here: https://github.com/meteor/meteor/tree/devel/packages/test-helpers. There often is some documentation inside each file.
Digging in the existing tests of meteor's packages will provide lot of examples. One way of doing this is to make a search for Tinytest. or test. in the package directory of meteor's source code

Which acceptance testing frameworks are better for backend development?

By backend I mean software systems that consume data, process files or communicate using machine interfaces (REST, SOAP, CORBA, etc...). No fancy web or UI testing is necessary. I have in mind Cucumber and Robotframework but I don't know how well suited they are in the task at hand.
There isn't an easy answer to this question.
Sounds like you got your domain right... because if you were trying to test UI/Web components acceptance testing frameworks make not be the right tool for the job.
You have a few options
SpecFlow
Cucumber
StoryTeller
FitNesse
mSpec
a few others.
I'm partial to StoryTeller & mSpec.. but each of these tools have their pros/cons.
Questions you should be asking yourself (and your team are)
Who is going to be writing/maintaining the tests?
Are self documenting acceptance tests provide value for your organization?
Which technology would integrate most easily with your current build process?
I have used Cucumber to test a batch application written in perl and plsql, an informatica transformation, and am currently using it to test a telephony ivr/queueing system. Ruby provided the gems I needed to drive the system and it was very easy for the testers to learn the language/syntax.
If it comes to Robot Framework I have an experience with bad support in Intellij for this. I'm using IntelliBot plugin. In many cases you will know your mistake like wrong syntax, cannot find keyword etc. late in test runtime.
Problems with finding imported libraries, no debug, no simple refactor like rename keyword across a project.