J'ai installé interne globalement et à l'invite de commande commandes 'interne servir' fonctionne très bien. Cependant, après avoir ajouté la propriété reporters dans intern.js si je cours la commande 'intern serve' alors rien ne se passe et la commande est bloquée comme ci-dessous en disant "Running runner tests ...".commande de service interne ne fonctionne pas après les journalistes ajoutés dans intern.js
D: \ start> stagiaire servent
Exécution des tests de coureur ...
Voici mon intern.js fichier
// Learn more about configuring this file at <https://theintern.github.io/intern/#configuration>.
// These default settings work OK for most people. The options that *must* be changed below are the packages, suites,
// excludeInstrumentation, and (if you want functional tests) functionalSuites
define({
// Default desired capabilities for all environments. Individual capabilities can be overridden by any of the
// specified browser environments in the `environments` array below as well. See
// <https://theintern.github.io/intern/#option-capabilities> for links to the different capabilities options for
// different services.
//
// Note that the `build` capability will be filled in with the current commit ID or build tag from the CI
// environment automatically
capabilities: {
'browserstack.selenium_version': '2.45.0'
},
// Browsers to run integration testing against. Options that will be permutated are browserName, version, platform,
// and platformVersion; any other capabilities options specified for an environment will be copied as-is. Note that
// browser and platform names, and version number formats, may differ between cloud testing systems.
environments: [
{ browserName: "chrome", platform: "WINDOWS" }
],
// Maximum number of simultaneous integration tests that should be executed on the remote WebDriver service
maxConcurrency: 2,
// Name of the tunnel class to use for WebDriver tests.
// See <https://theintern.github.io/intern/#option-tunnel> for built-in options
/*tunnel: 'BrowserStackTunnel',*/
// Configuration options for the module loader; any AMD configuration options supported by the AMD loader in use
// can be used here.
// If you want to use a different loader than the default loader, see
// <https://theintern.github.io/intern/#option-useLoader> for more information.
loaderOptions: {
// Packages that should be registered with the loader in each testing environment
packages: [
{ name: "dojo", location: "node_modules/dojo" },
{ name: "dojox", location: "node_modules/dojox" },
{ name: "dijit", location: "node_modules/dijit" },
{ name: "showcase", location: "dist/src/showcase" },
{ name: "common", location: "dist/src/common" },
{ name: "technical-topics", location: "dist/src/technical-topics" }
]
},
// Unit test suite(s) to run in each browser
suites: [ 'tests/**/*.js' ],
tunnel: 'NullTunnel',
// Functional test suite(s) to execute against each browser once unit tests are completed
functionalSuites: [ /* 'myPackage/tests/functional' */ ],
reporters: [
{ id: 'Runner', filename: 'tests/reporters/Runner/report.html' }
],
// A regular expression matching URLs to files that should not be included in code coverage analysis. Set to `true`
// to completely disable code coverage.
excludeInstrumentation: /^(?:tests|node_modules)\//
});
Oui, ma structure de répertoire est la même que celle que vous avez mentionnée. Mon fichier intern.js est dans le dossier des tests. La commande "intern serve" fonctionne correctement sans la propriété de reporters dans intern.js. Si j'ajoute la propriété reporters à intern.js alors seulement "intern serve" arrête de fonctionner. J'ai essayé aussi avec d'autres journalistes mais ne fonctionnait pas – shuklendu
Pourriez-vous signaler l'ensemble du projet (ou au moins un sous-ensemble simplifié de celui-ci) quelque part? Je suis curieux de savoir ce qui se passe ici, car la propriété 'reporters' ne fait rien en mode 'serve', et même si c'était le cas, la sortie que vous voyez n'est pas celle du reporter Runner. – jason0x43
Ce problème se reproduit même avec le tutoriel interne de base. J'ai partagé la configuration de base ici. Si je supprime la propriété reporters de intern.js alors seuls les travaux internes servent. Dépôt: https://github.com/shuklendu/intern-tutorial – shuklendu