Anable to integrate my webii 2 test project to my intagratioin server

6 posts, 0 answers
  1. amnas khalid
    amnas khalid avatar
    2 posts
    Member since:
    Mar 2010

    Posted 27 May 2010 Link to this post

    I'm just finished the automation of my tests and I want to integrate the project in my integration server  cc.NET. 


    Here is  Tests Task  what I added to the file server ccnet.config   

    <project name="RunAutomatedTest1" queue="Q1" queuePriority="1">
        <workingDirectory>D:\AutomatedTest</workingDirectory>
        <artifactDirectory>D:\Integration\unAutomatedTest1.Artifacts</artifactDirectory>
        <category>UnitTest</category>
        <webURL>http://ip/ccnet</webURL>
        <modificationDelaySeconds>2</modificationDelaySeconds>
        <maxSourceControlRetries>10</maxSourceControlRetries>
        <!--Stopped,Started -->
        <initialState>Started</initialState>
        <!--UseInitialState,UseLastState  -->
        <startupMode>UseInitialState</startupMode>
        <triggers>
          <scheduleTrigger time="03:15" buildCondition="ForceBuild" name="Scheduled">
            <weekDays>
              <weekDay>Monday</weekDay>
              <weekDay>Tuesday</weekDay>
              <weekDay>Wednesday</weekDay>
              <weekDay>Thursday</weekDay>
              <weekDay>Friday</weekDay>
              <weekDay>Saturday</weekDay>
              <weekDay>Sunday</weekDay>
            </weekDays>
          </scheduleTrigger>
        </triggers>
        <!--    <state type="yourStateManagerType" ..=""/>-->
        <sourcecontrol type="svn">
          <trunkUrl>http://server/svnrepos/AutomatedTest/trunk</trunkUrl>
          <workingDirectory>D:\AutomatedTest\AutomatedTestProject1</workingDirectory>
          <executable>C:\program files\VisualSVN\bin\svn.exe</executable>
          <username>user</username>
          <password>pass</password>
          <autoGetSource>true</autoGetSource>
          <checkExternals>false</checkExternals>
          <!--<webUrlBuilder></webUrlBuilder>-->
          <tagOnSuccess>false</tagOnSuccess>
          <tagBaseUrl>false</tagBaseUrl>
          <timeout units="minutes">10</timeout>
          <!--<issueUrlBuilder></issueUrlBuilder>-->
        </sourcecontrol>
        <labeller type="defaultlabeller">
          <initialBuildLabel>01</initialBuildLabel>
          <prefix>RunAutomatedTest1</prefix>
          <postfix></postfix>
          <incrementOnFailure>false</incrementOnFailure>
          <labelFormat>00000</labelFormat>
        </labeller>
        <tasks>
               <exec>
            <!-- Call mstest to run the tests contained in the TestProject -->
            <executable>C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\mstest.exe</executable>
            <baseDirectory>D:\AutomatedTest\AutomatedTestProject1</baseDirectory>
           <buildArgs>/testcontainer:bin\Release\AutomatedTest.AutomatedTestProject1.dll /test:LogInTest /resultsfile:results.xml</buildArgs>
            <buildTimeoutSeconds>30</buildTimeoutSeconds>
          </exec>
        </tasks>
        <publishers>
          <merge>
            <files>
              <file>D:\AutomatedTest\AutomatedTestProject1\results.xml</file>
            </files>
          </merge>
          <xmllogger logDir="D:\Integration\RunAutomatedTest1.BuildLogs" />
          <email  from="mail" mailhost="ip" mailport="25" includeDetails="TRUE" useSSL="FALSE">
            <users>
              <user name="name" group="buildmaster" address="mail"/>
            </users>
            <groups>
              <group name="projectteam">
                <notifications>
                  <notificationType>Always</notificationType>
                  <!--<notificationType>Failed</notificationType>
                  <notificationType>Fixed</notificationType>-->
                </notifications>
              </group>
              <group name="buildmaster" >
                <notifications>
                  <notificationType>Always</notificationType>
                </notifications>
              </group>
            </groups>
            <converters>
              <regexConverter find="$" replace="@xxx.aaa" />
            </converters>
            <!--
            Always  Send email when any build occurs.
            Change  Send email when the status of the build changes (e.g., from "Success" to "Failed").
            Failed  Send email when the build fails.
            Success  Send email when the build succeeds.
            Fixed  Send mail when the status of the build changes from "Failed" to "Success".-->
            <modifierNotificationTypes>
              <NotificationType>Failed</NotificationType>
              <NotificationType>Fixed</NotificationType>
              <NotificationType>Always</NotificationType>
            </modifierNotificationTypes>
            <subjectSettings>
              <subject buildResult="Success"         value="[${CCNetProject}][CruiseControl.NET][Success] The Build is Yet Again Successfull. Build N°[${CCNetLabel}] " />
              <subject buildResult="Broken"          value="[${CCNetProject}][CruiseControl.NET][Broken] Project Broke at ${CCNetBuildDate} ${CCNetBuildTime} , last checkin(s) by ${CCNetFailureUsers}"  />
              <subject buildResult="StillBroken"     value="[${CCNetProject}][CruiseControl.NET][StillBroken] Build is Still Broken for ${CCNetProject}, the Fix Failed." />
              <subject buildResult="Fixed"           value="[${CCNetProject}][CruiseControl.NET][Fixed] The build is OK Now, it was Broken Last Time. Build N°[${CCNetLabel}]" />
              <subject buildResult="Exception"       value="[${CCNetProject}][CruiseControl.NET][Exception] Serious Problem for ${CCNetProject}, Mostly a Status of Network / SourceControl" />
            </subjectSettings>
            <xslFiles>
              <file>xsl\header.xsl</file>
              <file>xsl\compile.xsl</file>
              <file>xsl\MsTestReport2008.xsl</file>
              <file>xsl\modifications.xsl</file>
            </xslFiles>
            <!--<attachments>
              <file>D:\Data\AFile.txt</file>
              <file>Relative.txt</file>
            </attachments>-->
          </email>
        </publishers>
        <externalLinks>
          <externalLink name="ccnet" url="http://ip/ccnet" />
        </externalLinks>
      </project> 

    and when i force the build of project it send me the mail :

    BUILD FAILED
    Project:     RunAutomatedTest1
    Date of build:  2010-05-27 17:54:24
    Running time:   00:00:01
    Integration Request:    Build (ForceBuild) triggered from UNICC-SERVER-
    Tests run: 0
    No tests found
    Modifications since last build (0)
     

    Many thanks

  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 28 May 2010 Link to this post

    Hi amnas khalid,

    I would like to focus on these lines from you ccnet.config file:

    <baseDirectory>D:\AutomatedTest\AutomatedTestProject1</baseDirectory>
         <buildArgs>/testcontainer:bin\Release\AutomatedTest.AutomatedTestProject1.dll /test:LogInTest /resultsfile:results.xml</buildArgs>

    It implies you have a coded unit test called LoginTest contained in your AutomatedTestProject1.dll file. Is this true or instead do you have a LoginTest.aii test you would like to have run?

    All the best,
    Cody
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. amnas khalid
    amnas khalid avatar
    2 posts
    Member since:
    Mar 2010

    Posted 28 May 2010 Link to this post

    Hi ,

    No i have too many tests in my project. I forgot removing the loginTest,  cause i was trying to make it work only on one test, but i didn't succeed. Normally when not putting the test, all the tests in the project should be executed, here is my config on my server, the ccnet task finshes and says no tests found:

    Do I need add a special special attributes on the aii tests to be supported by MStest testclass() and testmethod() ... ?

     

    <baseDirectory>D:\AutomatedTest\AutomatedTestProject1</baseDirectory>
     <buildArgs> /testcontainer:D:\AutomatedTest\AutomatedTestProject1\bin\debug\AutomatedTestProject1.dll /resultsfile:D:\AutomatedTest\AutomatedTestProject1\results.xml</buildArgs> 

    BUILD SUCCESSFUL

    Project:

     RunAutomatedTest1

    Date of build:

    2010-05-28 16:26:39

    Running time:

    00:00:05

    Integration Request:

    Build (ForceBuild) triggered from UNICC-SERVER 

     

    Tests run: 0

    No tests found

     

    Modifications since last build (0)

  4. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 01 Jun 2010 Link to this post

    Hello amnas khalid,

    Here's a pretty good video for how to run .aii tests using MSTest from the command line: http://tv.telerik.com/webui+test+studio/video/execute-webaii-test-with-ms-test. The only thing I found I had to do different was to prefix my .aii file with a .\. In other words to run a specific .aii test I have to enter:

    mstest /testcontainer:.\bingtest.aii


    Regards,
    Cody
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. Jorge
    Jorge avatar
    1 posts
    Member since:
    Sep 2010

    Posted 14 Dec 2010 Link to this post

    Hello,

    The video link is broken, it is now at http://tv.telerik.com/watch/automated-testing-tools/webui-test-studio-executing-webui-tests-with-mstest

    When trying to start webaii tests using mstest from the command line,

    mstest /testcontainer:"C:\Documents and Settings\jortega\Desktop\ProjectName\MyTest.aii"

    The syntax is almost the same except for the ".\" in from of the .aii file. The test is loaded and is about to execute but I receive this error:
    Failed to queue test run 'jortega@computername' 2010-12-14 17:04:09' : Value cannot be null
    Parameter name: path1

    I attempted to create a sample project and execute a simple google search like in the video and that succeeds. I am stumped as to the cause of this error. Has this ever been encountered before? Any suggestions would be greatly appreciated.
  6. Keaegan
    Admin
    Keaegan avatar
    126 posts

    Posted 20 Dec 2010 Link to this post

    Hi Jorge,

    This type of error occurs when you do not first navigate to the directory containing the test project. When you run MStest, it will assume that the folder you are currently in contains any necessary data files for the test to run (such as the .resx file for the test). The syntax is similar to what you are using, but you will still need to navigate to the folder that contains the test before running the mstest command. After doing so it should not provide the error you are receiving.

    The feedback you are seeing is the following:

    • MStest finds the test in question and begins to launch it
    • MStest searches for additional test files (.resx) (this is where your error hits)
    • MStest searches for additional data for the test (.dll)
    • MStest executes the test

    After the above are complete, a .trx file will be generated for the results (unless you specify otherwise). 

    Please use the process provided within the video blog and let us know if you run into further errors when running this from the command line.

    Regards,
    Keaegan
    the Telerik team

    Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!