IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Intégration Continue Discussion :

exception lors de l'exécution de tests unitaires nunit


Sujet :

Intégration Continue

  1. #1
    Nouveau Candidat au Club
    Profil pro
    Inscrit en
    Avril 2011
    Messages
    2
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Avril 2011
    Messages : 2
    Points : 1
    Points
    1
    Par défaut exception lors de l'exécution de tests unitaires nunit
    Bonjour à tous,
    J’ai besoin d'aide car je me prends la tête sur un problème entre Hudson et Nunit.

    Voici le contexte:
    On a plus de 600 tests unitaires utilisant Nunit. En les exécutant par ligne de commande Windows les tests sont tous exécutés et aucune erreur n'est détectée.
    Si j'utilise cette ligne de commande sous Hudson. Les tests passent tous sauf un!!
    J'ai alors cette erreur qui apparait:

    Unhandled exceptions:
    1) Hello.Database.Params.ParameterDatabase_UnitTest.B001_DeleteTS_and_Contents : System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
    at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
    at System.Windows.Forms.Form.ShowDialog()
    at CVIPC.WaitingForAction.ShowMe() in d:\Appli\Prj\Hello_Softwares\Hello\Hello\Hello\WaitingForAction.cs:line 87
    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()
    2) Hello.Database.Params.ParameterDatabase_UnitTest.B001_DeleteTS_and_Contents : System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
    at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
    at System.Windows.Forms.Form.ShowDialog()
    at CVIPC.WaitingForAction.ShowMe() in d:\Appli\Prj\Hello_Softwares\Hello\Hello\Hello\WaitingForAction.cs:line 87
    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()
    3) Hello.Database.Params.ParameterDatabase_UnitTest.B001_DeleteTS_and_Contents : System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
    at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
    at System.Windows.Forms.Form.ShowDialog()
    at CVIPC.WaitingForAction.ShowMe() in d:\Appli\Prj\CVI3_Softwares\Hello\Hello\Hello\WaitingForAction.cs:line 87
    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()


    En effet, ce test crée un thread, ouvre une fenêtre et la laisse ouverte tant que le thread n'est pas fermé.

    Ce que je ne comprends pas c'est pourquoi ce test passe en ligne de commande et pas sous hudson? Est-ce que hudson mets en place des options qui bloque ce type de test?

    Merci d'avance

  2. #2
    Nouveau Candidat au Club
    Profil pro
    Inscrit en
    Avril 2011
    Messages
    2
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Avril 2011
    Messages : 2
    Points : 1
    Points
    1
    Par défaut J'ai trouvé!!
    C'est bon. Après pas mal d'essais, j'ai trouvé d'où venait le problème. Je n'avais pas évoqué dans mon précédent mail que j'utilisais tomcat (configuré en tant que service) comme serveur.
    Si je lance hudson dans sa version standalone (sans l'avoir configurer en tant que service), l'exécution des mes tests unitaires se passe bien.
    Le problème semble donc venir de tomcat en tant que service Windows.

    Je vais utiliser hudson sans passer par tomcat et sans le configurer en tant que service.

Discussions similaires

  1. Réponses: 2
    Dernier message: 20/07/2011, 21h40
  2. Exception lors de l'exécution
    Par Fl.oz45 dans le forum Windows Forms
    Réponses: 7
    Dernier message: 17/03/2009, 14h48
  3. exception lors de l'exécution d'un test d'application
    Par caro_caro dans le forum SWT/JFace
    Réponses: 6
    Dernier message: 10/12/2008, 12h47
  4. [Virtual Pascal] Exception lors de l'exécution programme équation 2nd degré
    Par Sexyjulo dans le forum Autres IDE
    Réponses: 8
    Dernier message: 11/11/2008, 20h40
  5. Exception lors de l'exécution d'une application RCP
    Par bricelaurel dans le forum Eclipse Platform
    Réponses: 0
    Dernier message: 21/10/2008, 16h06

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo