Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8600307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:35:16+00:00 2026-06-12T01:35:16+00:00

I’m writing a Windows 8 app, and writing unit tests for it. How can

  • 0

I’m writing a Windows 8 app, and writing unit tests for it. How can I run them, in an automated fashion, inside the Windows 8 environment?

If I write super-simple JavaScript files, with no dependencies on the Windows 8 environment or the DOM, I can unit test them from the command line with Node.js. This is very fast (less than one second).

If I need to involve the DOM, and I keep my DOM usage to not-too-new features, I can use jsdom in Node.js and get the same setup and the same speed.

But jsdom is incomplete, and oftentimes I want to use basic Windows 8 features like the WinJS base library (e.g. WinJS.Promise) or the Windows.* enumerations. And ideally I should be testing in the same JS engine and DOM environment as my app will actually run in.

So ideally I need a test runner: a lightweight Windows 8 HTML5 container that can run some unit tests with a real DOM, and access to the WinJS and Windows Runtime APIs. For integration into the build process, I also need the ability to report results back to the command line (stdout, stderr) and change my test runner’s return code depending on success or failure. And it should be completely automated, runnable in the background, and very fast (less than 10 seconds).

I know there are tools like this for WebKit, e.g. PhantomJS. Does such a thing exist for the Windows Runtime HTML5 environment? If not, what APIs should I look into for building something like it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:35:17+00:00Added an answer on June 12, 2026 at 1:35 am

    Currently there isn’t a way to run a Win8/WinJS test suite in a headless manner. The runtime required for WinJS apps can’t be stood up on it’s own, without running a full WinJS app.

    The best way to run tests, IME, is to create a separate WinJS project in your solution to run your tests.

    Christopher Bennage has a blog post that describes the basic set up, here: http://dev.bennage.com/blog/2012/08/15/unit-testing-winjs/

    And I have a few blog posts that head a little further down the path:

    http://lostechies.com/derickbailey/category/winjs/

    http://lostechies.com/derickbailey/2012/08/17/asynchronous-unit-tests-with-mocha-promises-and-winjs/

    http://lostechies.com/derickbailey/2012/08/21/a-winjs-specrunner-automating-script-tag-insertion-for-unit-tests/

    If you don’t like the idea of running a separate project for your tests, or if you want QUnit instead of Jasmine or Mocha, check out QUnit-Metro: http://qunitmetro.github.com/QUnitMetro/ – it runs in-project with your real app, and gives you a context menu in development mode to run the tests for the page you’re on.

    I’m not a fan of QUnit or the way QUnit-Metro works in-page. But you might find it suitable if you don’t like a separate project.

    Hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing an app with both english and french support. The app requests
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
Does anyone know how can I replace this 2 symbol below from the string
I am using Paperclip to handle profile photo uploads in my app. They upload
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.