Unit test cases run twice on TFS2012 build server

Hi,
I have enabled the build definition to run the test cases using Visual Studio Test Runner in TFS2012 build server. Once it runs I can see that each test case ran twice. Suppose if I have 5 test cases, 5 will be passed and same 5 will be failed. Why it ran
for second time and failed? Please advice.
Below is my activity log. If you notice at the end of the below log, same test cases ran twice. First all are passed and then failed.
If Not DisableTests00:00:21
Inputs
Condition: True
Run Tests00:00:21
If Not TestSpecs Is Nothing00:00:21
Inputs
Condition: True
For Each TestSpec in TestSpecs00:00:21
Inputs
Values: Run tests in test sources matching **\*test*.dll, Target platform: 'X86'
Try Run Tests00:00:21
Handle Test Run Exception00:00:00
If testException is NOT TestFailureException00:00:00
Inputs
Condition: False
Set TestStatus to Failed00:00:00
Inputs
LabelName:
SourceGetVersion:
KeepForever: False
DropLocation:
Status: None
LogLocation:
BuildNumber:
Quality:
TestStatus: Failed
CompilationStatus: Unknown
If spec.FailBuildOnFailure00:00:00
Inputs
Condition: False
Get Requests Approved for Check In00:00:00
Outputs
Result: IQueuedBuild[] Array
Mark Requests for Retry00:00:00
Inputs
Behavior: DoNotBatch
Requests: IQueuedBuild[] Array
Force: False
If spec Is AgileTestPlatformSpec00:00:00
Inputs
Condition: True
Run Visual Studio Test Runner for Test Sources00:00:00
Assign spec to agileTestPlatformAssembly00:00:00
Inputs
Value: Run tests in test sources matching **\*test*.dll, Target platform: 'X86'
Outputs
To: Run tests in test sources matching **\*test*.dll, Target platform: 'X86'
Find Visual Studio Test Platform Test Assemblies00:00:00
Inputs
MatchPattern: d:\Builds\8\Test\OfficeLink\src\**\*test*.dll
Outputs
Result: System.Linq.OrderedEnumerable`2[System.String,System.String]
If Visual Studio Test Platform Test Assemblies Found00:00:00
Inputs
Condition: True
If agileTestPlatformAssembly.HasRunSettingsFile00:00:00
Inputs
Condition: False
Run Visual Studio Test Runner for Test Sources00:00:00
Inputs
ResultsDirectory:
TreatTestAdapterErrorsAsWarnings: False
UpdateFrequencyTimeout: 30
RunSettings:
Platform: Any CPU
TestSources: System.Linq.OrderedEnumerable`2[System.String,System.String]
KeepAlive: False
UpdateFrequency: 5000
TestCaseFilter:
PublishResults: True
RunName:
Flavor: Debug
ExecutionTimeout: 0
ExecutionPlatform: X86
DisableAutoFakes: False
Passed TestMethod1
Passed TestMethod1
Passed RegisteredTypeShouldBeRegistered
Passed RegisteredTypeLifeTimeManagerIsTryShouldBeRegistered
Passed RegisteredTypeWhithoutNameShouldBeRegistered
Passed RegisteredInstanseShouldBeRegistered
Passed RegisteredInstanseWithoutNameShouldBeRegistered
Passed RegisteredInstanseShouldBeResolved
Passed AllRegisteredInstanseShouldBeAllResolved
Failed RegisteredTypeShouldBeRegistered
Failed RegisteredTypeLifeTimeManagerIsTryShouldBeRegistered
Failed RegisteredTypeWhithoutNameShouldBeRegistered
Failed RegisteredInstanseShouldBeRegistered
Failed RegisteredInstanseWithoutNameShouldBeRegistered
Failed RegisteredInstanseShouldBeResolved
Failed AllRegisteredInstanseShouldBeAllResolved
Test Run Completed. 16 tests executed.
Test Run Failed.

Hi DHegde,  
Thanks for your post.
You’re using TFS 2012 Update 4 and VS 2012 Update 2?
Please manually build your project and run test project using VS 2012 on your client, then check the test case result in Test Result window, the test cases be executed as expect? 
If everything works fine when manually run your test project using VS 2012, which build process template selected in your build definition? If it’s not TFS 2012 default build process template, please try use default build process template in your current
build definition, then queue build definition and view test result in TFS Build log again.
If you’re using default TFS 2012 build process template in your current build definition, but still received the same issue, how did you configure the test in your build definition, please share the detailed configure screenshot(s) here.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • How to make sure all my automatic test case run in one session?

    Hi guys,
        I'm doing some automatic test for our products.
         Now i'm hindered by an issue(maybe,due to my wrong configuration).
         I've wrote some test method in a Coded UI Test project,and these run perfect on local machine.And i build an environment includes Builder Controller,Builder Agent,TestController and Test Agent etc, and that the test cases have been written
    in MTM already. 
          After that,i built the project,deployed the project and run the Coded UI Test on Test Agent machine,and i found it seems that he test cases run on different sessions.I have no idea how to config or set up to make sure all my test cases
    run just in one session.
        Could anyone help me,please?

    Hi dean.chen,
    >>I found it seems that he test cases run on different sessions.I have no idea how to config or set up to make sure all my test cases run just in one session.
    According to your description, could you please tell me what the different sessions are when you run the test cases in MTM?
    Why did you want to run the test cases in one sessions?
    where did you see the test cases run on different sessions?
    Could you please tell me how many test agents machine you use to run these automatic test cases in MTM?
    As far as I know that if you just use one test agent machine to run these automatic test cases in MTM, these test cases will be run one by one on the one test agent machine.
    To help you solve this issue, please tell me more detail message about this issue.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Unit test cases using sqldeveloper2.1.1

    hi,
    currently i am using sqldeveloper1.5.1. Using this version i am not able to write unit test cases.
    i need to write unit test cases which is possible using sqldeveloper2.1.1.
    can i connect my oracle database using sqldeveloper2.1.1. oracle version information as follows
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi.
    please suggest which sqldeveloper zip file is suitable for this.

    whatever unit testcases we can write for a procedure using sqldeveloper2.1.1.
    can it be executed in sqlplus environment.
    or it needs sqldevelopertool only to execute these testcases.

  • How do you have a single test case run on multiple platforms in both a Deploy/Test build and via MTM?

    I am wanting to have a scheduled nightly build execute my testcases for multiple platforms/configurations.  I have multiple VMs running in these environments but the method Microsoft provided
    (without digging into customizing the build template) doesn't provide any functionality for this.  This is a basic use case for automation that I can't believe they would miss.  Has anyone run into this and found a solution.  Is it just that
    you have to completely customize the template?
    For a more complete use case...
    I have 4 customers that have different configurations and different OS platforms on top of a generic configuration.  I want the build/deploy/test build to automatically run my 152 test
    cases to at minimum those 5 environments.  I want this to run every morning at 1am and the tests should in the different environments in parallel (ie all of customer 1 tests run at the same time as customer 2 tests...). I also don't want to have to create
    152 * 5 test cases since that will bloat things and cause more management/maintenance headaches.

    I am wanting to have a scheduled nightly build execute my testcases for multiple platforms/configurations.  I have multiple VMs running in these environments but the method Microsoft provided
    (without digging into customizing the build template) doesn't provide any functionality for this.  This is a basic use case for automation that I can't believe they would miss.  Has anyone run into this and found a solution.  Is it just that
    you have to completely customize the template?
    For a more complete use case...
    I have 4 customers that have different configurations and different OS platforms on top of a generic configuration.  I want the build/deploy/test build to automatically run my 152 test
    cases to at minimum those 5 environments.  I want this to run every morning at 1am and the tests should in the different environments in parallel (ie all of customer 1 tests run at the same time as customer 2 tests...). I also don't want to have to create
    152 * 5 test cases since that will bloat things and cause more management/maintenance headaches.

  • JUnit - Strange Test Case running problem

    Hi Everyone,
    I am very new to J Unit testing. Here's my problem. I have a project set up in Net Beans. Inside the project, there is a folder named "tests". This folder contains the following class:
    public class Bob
        public static void main(String[] args)
            System.out.println("Hello");
    }There are other classes inside of this folder that extend TestCase and TestSuite. They are functionally working according to J Unit testing (they prompt a JUnit Test Results panel in Net Beans with Pass or Fail).
    The problem that I am having upon running/executing the class "Bob", NetBeans treats it as a JUnit test case and brings up a Pass/Fail panel. I do not want this to happen. I just want this class to print "Hello" as if it was not a Test. Do you guys have any idea what the problem is? My "Bob" class has nothing imported.
    Also, I have another question. Is there a way that I can take INPUT from a user when running a Test Case (such as using the Scanner class)? My test cases seem to skip over the Scanner.nextLine() code for some reason.
    Thanks in advance.

    Hi BigDaddy,
    Thanks for the suggestion, however I am unsure of what you mean by injecting the scanner. Here is an example of what I would like to do:
    public class BenchmarkTestSuite extends TestSuite
        public static void main(String[] args)
            try
                Scanner scan = new Scanner(System.in);
                System.out.print("Enter the number of iterations for read: ");
                readIterations = scan.nextInt();
                .... etc
            catch(Exception ex)
                ex.printStackTrace();
        .... etc
    }Here, the prompted question for the user gets ignored for some odd reason. I would like for the tests to not start until the question has been answered by the user. NetBeans is strange. I commented all of the test methods to see if the question gets printed to the console, and it does not.
    Thanks.

  • Accessing Resource file in a bundle from unit test case

    Hello All,
    Here is my problem . I have a plugin app that is loaded in of the host application. I have a resource plist file in the plugin. I access the resource using the api [[[NSBundle mainBundle[ bundleWithIdentifier:@"MyPluginIdentifier"] pathForResource@"Resource_Name" ofType:@"Resource_Type"]. This I get path of the resource file perfectily, but it fails when I do unit testing. I am using SenTest framework kit for unit testing. When I access the resource by using above api, I get null value. Since the running executable will be otest which is located at /Developer/Tools folder, So how to access my resource file in unit test. Should I need to hard code for the Path? Any inputs are highly appreciated.
    Thanks,
    Naveen

    So there is some important stuff realized by the UIKit UIApplicationMain function that has to be reproduced in the setup of the test.

  • Test cases runs correctly on IDE but fails on the test runner

    Hi Guys,
    I have a test case here that works fine on my Mars IDE with RCPTT but fails when I run it via the Maven plugin on the same machine.
    The summary of the test case here is that it auto-generates some java files based on changes done to a DSL type language. You will see that there is a Generator project there that does this. Any changes to the type file will trigger the java file to be regenerated with whatever was defined in the Generator project. On the IDE it all works but when it's run via the test runner, it always fails for some reason.
    One interesting thing to note there is if that test case is run first, it does not fail. I initially suspected that the previous test case might have done something to the AUT workspace/environment but it's difficult to prove. The test case in question does have contexts to clear the workspace and to add projects as well as a context for setting the preferences. I did try removing all the contexts except for the workspace context that contains the project that it needs but the execution result is still the same. If I manually ran the same AUT (extracted somewhere else) with the generated test-runner aut workspace right after and made some changes to the type file, the java files are generated correctly.
    So the problem now is, we're not sure what the test runner is doing differently with the RCPTT IDE in this case. It would seem like the test runner is preventing the AUT from generating the files or there might be an error that prevents the generation from happening.
    I've attached the results folder from the test runner execution and the log file from the from the runner-workspace folder.
    cheers!
    Joseph

    Hi Folks,
    We've found out the cause of the problem and have found out that this is not entirely RCPTT related. Apologies for the disturbance. Marking this as a non-issue.
    cheers!
    Joseph

  • Unit Tests with Jemmy

    I currently write some Unit Tests with jemmy. But i did not find a solution to run it headless. The test should run on a hudson build server and there is no X installed. Are there any solutions?
    cheers
    Andy

    Not presently, we have the same issue internally. I have a half-finished "Headless Glass" implementation would allow exactly this, but due to other (crucial and exciting) FX work I am doing at the moment, I haven't been able to finish this.

  • Flex Builder 3 Debugger hanging unit tests

    If I try to run my Unit Tests in debug mode from Flex Builder 3, FF and IE just hang until I cancel the debugger.  Is this expected?

    Nope. I developed the whole core in debug mode of Flex Builder 3, so I know it works there.
    Mike

  • TFS Build - Unit Test is showing wrong result

    HI Team,
           I have a build definition(“BDPR's Playground CI Build”)  which is compiling 2 solutions and running the unit tests in them. Globally I have
    6 unit tests that pass, 0 that fail and 2 that are inconclusive, which gives a total of 8 unit tests. When I run this build definition, what is reported in the build summary is “6/6 test(s) passed, 0 failed, 0 inconclusive”, which is obviously wrong. It looks
    like inconclusive unit tests are completely ignored by the build system. Is this a bug or am I missing some subtle option somewhere in the build definition to get this right? 
           Displaying a given build summary in Visual Studio gives less information that in the web portal. The web portal reports the number of inconclusive
    unit tests (but with a wrong value – see previous item) whereas Visual Studio doesn’t report the inconclusive unit tests at all. Example: for the build “BDPR's Playground CI Build_20150409.5”, web portal reports “6/6 test(s) passed, 0 failed, 0 inconclusive”
    while Visual Studio reports “6 of 6 test(s) passed”! Is this a bug or is there some misconfiguration somewhere?
    Regards
    Hem

    Hi Hem,  
    Thanks for your post.
    What’s the version of  your TFS and VS?
    Yes, as far as I know the inconclusive unit test result not show in TFS build summary by default. Bu you can view the TFS build
    Diagnostic log to view which inconclusive unit tests be executed in build.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Run test case from command line

    Hi  All,
    Working environment : VS 2013 professional 
    Project type : Unit test project for (Windows 8.1 and Windows phone 8.1)
    I have a set of unit test cases and want to run it on command line.I tried MSTest.ext and vstest.console.exe for running test case but not succeed.  
    command :  MSTest.exe /testcontainer:path of project dll
    command :  vstest.console.exe path of project dll
    Type of Error
    Error : Unit test case for windows store and windows phone app can't be run outside appcontainer. 
    Error : No tests to execute
    command :  MSTest.exe /testcontainer:path of appx
    command :  vstest.console.exe path of appx
    Error : root certificate error 
    I just want to run windows 8.1 and windows phone 8.1 run test cases from command line.
    Thanks in advance.

    Hi vicky2468,
    Based on your issue, as far as I know that if we want to run unit test for windows store and windows phone app using mstest.exe or vstest.console.exe in command line, you will need to execute the .appx instead of the dll in command line.
    In addition, I tried to run the appx for unit test in command line,
    but I found that I also get the same issue as yours. I could not execute the appx for unit test in command line successfully.  But if we run it with VS IDE in Test
    Explorer windows, it seems that it works fine.
    So I suggest you can submit a feedback for this issue, to get the issue confirmed and diagnose by product team, would you please create connect report for it? You will get email notification for update.
    http://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx
    When you submit the connect, I suggest you can provide your project for product team so that product team will
    be better help you solve this issue.
    If you submit it, please share me the link here, I will help you vote it. I think we could get the latest information
    from the product team experts. Of course, if I get any latest useful information, I will update it here.
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Unit testing PL/SQL used in APEX application

    question from my customer :
    I am developing an application in Oracle Application Express and am working on unit tests for the PL/SQL stored procedures and packages that are stored in the underlying database and that are used by the APEX application. These unit tests should run within the SQL Developer Unit Test framework.
    The problem is that some of the PL/SQL code stored in the database uses functions like NV('APPLICATION_ITEM') to access items in the apex application. These do not return any values when I try to execute the PL/SQL within the unit test framework, ie through the backend. While it is good that the NV function does not error, NULL do not really work well in my scenario either (for example when the result of this functions is inserted into a NOT NULL column of a table). I can think of a few workarounds, such as creating my own NV function inside the test schema to return desirable values, but nothing seems a really satisfactory solution. I just wonder if there is any best practice recommendation from Oracle for this scenario - how can I run code that uses APEX-specific functions through the back end. I could not find anything in the APEX documentation for this but I'd be interesting to know if there is any recommendation how to best deal with this case.
    I am using SQL Developer version 4.0.0.13.80

    User[[:digit:]*
    Your PL/SQL Package APIs are poorly designed.
    You need to take Tom Kyte's quote to heart:
    "Application come and application go, but data remains forever"
    In short, you need to separate your database processing code (the stuff you need to unit test) from front-end/middle tier code.
    (repetitiveness is for effect.. not rudeness.)
    As such, The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in APEX.
    The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in .NET.
    The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in JSP.
    The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in Jive.
    The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in Ruby.
    The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in Perl::CGI.
    The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in P9.
    The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in <place latest and greatest thing here>.
    Again, I don't mean to sound rude.  I'm just trying to reinforce the idea that you need to separate database code from middle-tier/front-end stuff.
    Basically, you will need to separate all of your packages into multiple parts.
    a _CORE package (that will be unit tested) that does all the hard work
    an _APEX package for APEX infrastructure (this works with NV()/V(), etc.)
    a _NET package for .NET infrastructure when you need it
    a _JSP package for the JSP infrastructure when you need it
    a _JIVE package for the JIVE infrastructure when you need it
    a _<place latest and greatest thing here> for the <place latest and greatest thing here> when you need it.
    MK

  • How  to genearte Unit Test reports  through  ANT/Command  line ?

    Hi,
    I am using sql developer unit test feature to test my database code. I am planning to execute and generate reports by running ant script.
    Is it possible to get the unit test results in any format (text,XML,HTML) after running the tests.
    How to integrate report generation tasks as part of Automated builds?
    Is there any command line utility do through can invoke through ant task?
    Thanks,
    Fernando

    Fernando,
    I, too, am looking to run our PL/SQL unit test suites through our automated ant build scripts. Currently, I've only been able to determine that there is a "UtUtil.bat" and "UtUtil.sh" command line utility for win and linux in /sqldeveloper/sqldeveloper/bin. However, it only take three switches:
    UtUtil -run ?
    UtUtil -imp ?
    and
    UtUtil -exp ?
    While this does provide some limited value to us through automating the importing of our exported test suites and then running them as part of our builds, it doesn't help in running reports on the test runs and exporting the reports to something our build processes can consume (i.e. xml).
    Also, we want to be able to run our full db build on (almost) any of our development machines and we don't want to have to have a unit test repository already preconfigured on each development db. I haven't found a utility to automate the creation of the unit test repository user and the repository, and then whena all the test suite runs have finished and the reports run, delete the repository and repository user.
    We have used Quest's Code Tester product in the past and it had all of these great features that I am really hoping Oracle can either implement or expose to us.
    Regards and best of luck,
    Mike Sanchez

  • Sample Test Case templates for Reports

    Hi all,
    May I know , how the unit test cases would be for reports. Need Some Sample Templates ..Kindly Advice where Can I find..
    Edited by: 796797 on Mar 17, 2011 10:43 AM

    Here are some checklist
    Field Names
    Font Size acorss the report should be consistent
    columns should wrap up in a readable format
    decimal places for % fields.
    Decimal places for quantity fields.
    Reports should have grid lines, this will be helpful from a readability standpoint
    Right align the measures along with the associated headers
    The sub-total text
    No column headers should be underlined
    Backend filters at the top on the right
    Header/Footer
    Download to PDF and Excel and Print HTML
    "Check 1. Prompts sequence
    2. datatype of prompts - drop down or multiselect
    3. default values and
    4. report results returned after selecting any prompt"
    "Run the report with some filter values and see if filters are working.
    Access the Report and try to Modify the report request by selecting the modify link, include new fields and remove some default fields
    Save the report
    Validate the calculations on calculated fields.

  • Create Unit Test Vectors From The Unit Test Configuration Window

    I have recently been using more test vectors in the unit test framework.
    The principle works well but if you are in a unit test and decide you need a test vector you must:
    Close the unit test configuration
    Create a test vector
    Set up your vector (entering values and data types, which is much easier if you could see the actual unit test case)
    Close the vector configuration window
    Open the unit test configuration
    Assign the new vector file to the unit test
    Now you can assign vectors to test inputs
    This seems convoluted and forces unnecessary context switchs.
    I propose that at a minimum, you should be able to create a new vector file and launch it's configuration without leaving the unit test configuration window. I suspect that the whole process could be streamlined even further though.
    James Mc
    ========
    CLA and cRIO Fanatic
    wiresmithtech.com/blog

    Oops supposed to be ideas exchange, sorry!
    James Mc
    ========
    CLA and cRIO Fanatic
    wiresmithtech.com/blog

Maybe you are looking for

  • Transfering Divx movies from Macbook to PS3 via usb

    I recently purchased a PS3 in hopes of viewing my divx movies I currently have on my Macbook on it.  I know I can stream directly to the PS3 and I will deal with that in time.  However every time I transfer a movie to a usb stick and insert it in the

  • Reversal of a budget document can't be undone

    I have a posted budget document from several months ago that someone tried to reverse recently by preposting a reversal and then decided to reject the reversal.  The workflow tried to undo the preposted reversal but got the following error: "Original

  • Unable to Specify credentials during service call

    Hi I want to call CHECKIN_UNIVERSAL service from a JSPX page. I have added the following tag in my jspx... <wcm:idcService service="CHECKIN_UNIVERSAL" var="callStatus"> <wcm:idcParameter name="doFileCopy" value="1"/> <wcm:idcParameter name="dUser" va

  • How to play a cue point with mixer

    I know how to play a cue point of sound with the method: sound(1).queue([#member: ...  #startTime: ... EndTime: ... ]) How can I transfer the method of cue point using  the mixer? I need to have any hint about this because I must use both cue point w

  • Please Help: Playstation Banned Error Code WS-37338-4

    Hi I tried signing into the PSN and got the error code WS-37338-4 saying that "Access to PSN from this PS4 has been banned or temporarily suspended." Can someone please help? I don't play online and literally use my login to update my squads on fifa