locked
Unit tests for Metro Style App with HTML5/Javascript

    Question

  • Hello,

    Yesterday I downloaded Windows Release Review and I was hoping to find a Unit Testing Project template for JavaScript Metro Style Applications.

    However, unfortunately there is no such thing. We have unit test projects for C#, VB.NET and C++, but we don't have for JavaScript. And as far as I know, we are supposed to develop same real/complex/production applications with any language.

    No real project should go ahead without some unit testing support, so I would like to know what plans do you have to enable this technology in Metro Style Apps with JavaScript. I suppose that Unit Testing will be soon a first citizen element as it is for the rest of the languages available to develop Metro Style Apps.

    Thanks for the info.


    Si la respuesta es correcta, por favor márcala como correcta. También puedes votarla como útil si te lo ha sido.

    Saturday, June 2, 2012 1:03 PM

Answers

  • I agree with you Javier. It remains a mystery why VS did not support proper Unit Testing or behold Behaviour Testing for so long time (for C++ projects).

    I wonder how MS tests their own JS apps (May I have a wild guess?) ;)

    As Jeff pointed out, we are currently working on a drop-in unit/behaviour testing framework. We have it running already but its not in a shape for public release yet (lots of msbuild custom build steps). As soon as its ready (it will come with MIT license) I will make an announcement here.

    Monday, June 4, 2012 6:37 PM

All replies

  • Hi Javier,

    We have no public announcement for a Unit Testing Project template.

    -Jeff

    PS.  This may help you: http://social.msdn.microsoft.com/Forums/en-US/winappswithhtml5/thread/0a7c565c-fb62-4d01-b480-63fab476ccff


    Jeff Sanders (MSFT)


    Monday, June 4, 2012 4:22 PM
    Moderator
  • I agree with you Javier. It remains a mystery why VS did not support proper Unit Testing or behold Behaviour Testing for so long time (for C++ projects).

    I wonder how MS tests their own JS apps (May I have a wild guess?) ;)

    As Jeff pointed out, we are currently working on a drop-in unit/behaviour testing framework. We have it running already but its not in a shape for public release yet (lots of msbuild custom build steps). As soon as its ready (it will come with MIT license) I will make an announcement here.

    Monday, June 4, 2012 6:37 PM
  • Hi Jeff,

    Thanks for your answer.

    I understand that "no public announcement for a Unit Testing Project template" means that you don't plan to support Unit Testing for Javascript.

    The solution in your link doesn't seem to be tailored for WinRT at all. I would expect first citizen support: integration with test view, TFS build results, etc. I don't think that Jasmine would give us anything of that.

    And of course eventually somebody will probably fill the gap, but for me it is a little bit disappointing that there is no any news about native support from Microsoft.

    Anyway, I will stay tune, I may get supprise with a turn in Microsoft direction about this issue.

    Thanks again.


    Si la respuesta es correcta, por favor márcala como correcta. También puedes votarla como útil si te lo ha sido.

    Monday, June 4, 2012 8:50 PM
  • Hi Phil,

    I will be more tan happy to give a look to your solution when it is ready.

    Thanks for your answer.


    Si la respuesta es correcta, por favor márcala como correcta. También puedes votarla como útil si te lo ha sido.

    Monday, June 4, 2012 8:50 PM
  • Javier, we have no support for TFS yet, but for another (non MS specific) CI Server environment. Our Testrunners and reporters can be easily extended to support the TFS output as well I guess. Never used the TFS though.

    Our current unit tests run the app, write a report XML and even display the results within the app itself and in case of no errors terminate the app.

    In our ui tests (behaviour tests) for all tests, the testrunner deploys the app, runs a specific feature (you can see it actually on screen), writes the test results into an xml, terminates the app and uninstalls it (to have a clean slate for the next feature to test).

    All XMLs are handed to Jenkins and in case everything is green, it packages a new deployable version from the git master branch.

    I think an integration with the test view inside the IDE is possible. But developers that do not want to buy the Ultimate version of VS will be out of luck, because they cannot load any VS Extensions. So for them, our current solution would already work. Maybe you check it out, when its ready for public and give it a try (even without the test view integration).

    Tuesday, June 5, 2012 4:17 AM