Unit tests with ant (FB4 beta)?

Since flexunit is integrated with FB4, I was wondering how to run unit tests with ant on FB4 (using 3.4 sdk). In my current ant build file, the <mxmlc> and <compc> tags both work but the tag <flexunit> does not seem to work anymore (it worked on FB3 with flexunit download). So is there anyway currently to run unit tests on FB4 using ant?

Hi,
Let us take your requirements as separate two requriements.
1. Using the flexunit ant task - I think for this you needed a separate ant library to support this. So this may be missing in the ant available with FB. May be you can analyse this and add on your own and try out.
2. Debuggin the results.
Now FlexBuilder has the feature inbuilt as part of the IDE which provides more featuers like , source naviagation, rerunnig , saving results loading results etc.FlexBuilder uses its own set up to show the results details in IDE.
Currently other than using the feature in FB, there is no way to debug the results of the tests. However if you would like to get the tests to be run by ant task, and analyse the results, the following can be used.
Option 1 : Run outside FB, show and analyse results in FB
a. Use the FB, create some sample testCases in FB.
b. Use 'Execute FlexUnit tests' from the run,  or debug launcher
c. Use the option Save configuration. This will get the configuration as xml or mxml file. You can use this file template and generate your test cases (may be you will configure your tests in a testSuite class and always use that as the input to the application, so that application syntax never changes). If you run the mxml created swf  (whch you can do by the simple ant tasks which does not use the flexunit task ) out side FlexBuilder and if the FlexBuilder is open, you can still see the results in the FB and analyse the results. (You need the library which is used by the FB to use the classes. You can get the location of swc file by inspecting the library path of a project in which you have added the testCase or testSuite class using the FB IDE)
Option2:Run outside FB and  Analyse the results in FB.
If you have the project for which you have run the tests, and you have the XML results of the run, you can still analyse the results in the FlexBuilder.
a. Ensure that the report is in the required syntax of FB. (we have tried to use the similar syntax as that of the JUnit resutl report)
b. Use FB, load your project, open the FlexUnit result view, use the open result option in the FB. This should load the XML in FB (we have only ensured to open the result files which were created using FB ,back in the result view. So if you are facing some issue in opening your XML, you can refer the required syntax by saving a sample run result from FB)
Option 3: Run and analyse the results in FB.
a. Have the input setup mentioned to FB. (If you would like to integrate changes, have a suite class which will take care of this and mention in the Execute FlexUnit tests to use this suite class. But there is no way to specify to run the FB commands outside FB.)
b. So whenever you would like to anlyse the tests, you need to run your test in FB and then analyse the results shown in result view.
Please let me know whether this is what you are looking for.
Thanks,
Rani

Similar Messages

  • Unit Testing with Microsoft Sharepoint Emulators and Fakes with Visual Studio 2013

    Hi All,
    I have created Test Project and now creating Test cases for Sharepoint. I found a link on MSDN which suggests using Fakes framework but it supports VS2012 and I am using Visual Studio 2013.
    So how can I use it with VS2013 or is there any other way with which I can implement the Test cases with VS2013.
    Please suggest.
    Thanks in advance.
    Himanshu Nigam

    Hi HimanshuNigam,
    According to your descrition, my understanding is that you want to use Fakes framework to create test case for SharePoint project in Visual Studio 2013.
    If you want to test using Fakes Framework, you can use the codeplex extension to achieve it. It supports Visual Studio 2013.
    Here is a detailed article for your reference:
    Better Unit Testing with Microsoft Fakes
    About how to include the Nuget package, you can use the package with the link below:
    NuGet Package Manager for Visual Studio 2013
    Installing NuGet
    If you still have question about this issue, I suggest you can create a post in Visual Studio, more experts will help you and you can get more detailed information from there:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=visualstudio%2Cvsarch%2Cvsdbg%2Cvstest%2Cvstfs%2Cvsdata%2Cvsappdev%2Cvisualbasic%2Cvisualcsharp%2Cvisualc
    Best Regards
    Zhengyu Guo
    TechNet Community Support

  • 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.

  • [svn:osmf:] 11159: Updating unit test with a check to all expected events firing properly.

    Revision: 11159
    Author:   [email protected]
    Date:     2009-10-26 12:12:10 -0700 (Mon, 26 Oct 2009)
    Log Message:
    Updating unit test with a check to all expected events firing properly.
    Modified Paths:
        osmf/trunk/framework/MediaFrameworkIntegrationTest/org/osmf/content/TestContentElementInt egration.as

    camickr wrote:
    Do you really expect us to read all that code to try and understand what you are attempting to do?
    If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)", that demonstrates the incorrect behaviour.
    http://homepage1.nifty.com/algafield/sscce.html
    Absolutely not, I wouldn't post such a large amount of code expecting people to read it. I indicated that I believe my error only lies within one of two classes, and that I highlighted the two methods with comments.
    I was told to create an SSCCE as you have mentioned, but I believe all of this code is necessary for the program to run properly, so I only provided it all for compilation purposes.
    I'll check the examples posted, and if I need to I'll see if I can change my methods to use the swing timer class as the first reply mentions, but I did not think this would be necessary.
    Edited by: Drew___ on Nov 29, 2007 3:28 AM
    I have just figured out what my problem was, sorry it was quite a simple mistake. When checking for user input, I was immediately resetting the eventFlag or something afterwards. This meant the object would stop moving as it couldn't remember my last keypress. Thanks for your help, those tutorials are really good.

  • FlexUnit4 tests broke in FB4 beta 2

    We had numerous FlexUnit4 test classes containing many test cases (both "regular" and async) running from Flash Builder 4 beta 1 (created based on http://www.insideria.com/2009/05/flashbuilder4-will-support-fle.html ).  These all stopped running with the release of Flash Builder 4 beta 2 (just a
    blank white page displayed (view source reveals the html wrapper for the runner SWF).
    I even went so far as to delete the old mxml runner and the previous flexunit SWCs; then created a brand new Test Class and Suite (based on http://help.adobe.com/en_US/Flex/4.0/UsingFlashBuilder/WSA8198309-A6A6-4c68-A65C-24C6AB4D6 AA7.html ) to try to get a feel for any changes to running the tests.  However, even running these results in just a blank white page opening in the browser, and no tests running.
    I know this is a really open-ended question (sorry!) but I'd like to hear thoughts of resources I could look at, or things to try to get these tests running again.
    Thanks!

    Mike, thanks for your message.
    Upon further investigation of this, I had to start up a server and point to "localhost:port" (I'm communicating with a Ruby/Rails server for various files, logic and DB interaction) in order to get the tests to run.
    The way I have my project set up is building the SWF directly to a directory in my Rails server for ease of development and test runs (no need to copy the SWF into the server folder).  So, when I build my FlexUnitApplication.swf, it builds to this same directory.  Executing Flex Tests opened the browser, pointing to D:/subdirectory/FlexUnitApplication.html, but the FlexUnitApplication.swf never gets loaded into the html container -- unless the server is running.
    I haven't figured out yet why this is required as the unit tests are all written to run independently of a server, and server calls are mocked.
    I'm continuing to investigate this.

  • Unit testing with TLF

    While unit testing complex formating, I hit several problems. Below are simple tests that fail with an error. Does anybody know what is wrong with these tests?
    Thanks for any hints,
    Marc
        public function test_apply_Link():void
            var init:XML = <TextFlow xmlns="http://ns.adobe.com/textLayout/2008"><p><span>aaa</span></p></TextFlow>
            var textFlow:TextFlow = TextConverter.importToFlow(init, TextConverter.TEXT_LAYOUT_FORMAT)
            var editManager:IEditManager = new EditManager()
            textFlow.interactionManager = editManager
            editManager.selectRange(1,2)
            editManager.applyLink("http://livedocs.adobe.com/", "_self", true) // throws error:
            RangeError: Error #2006: The supplied index is out of bounds.
                at flash.text.engine::GroupElement/replaceElements()
                at flashx.textLayout.elements::ParagraphElement/http://ns.adobe.com/textLayout/internal/2008::insertBlockElement()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_core\src\flashx\textLayout\elements\ParagraphElement.as:277]
                at flashx.textLayout.elements::FlowLeafElement/http://ns.adobe.com/textLayout/internal/2008::createContentElement()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_core\src\flashx\textLayout\elements\FlowLeafElement.as:95]
                at flashx.textLayout.elements::SpanElement/http://ns.adobe.com/textLayout/internal/2008::createContentElement()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_core\src\flashx\textLayout\elements\SpanElement.as:77]
                at flashx.textLayout.elements::ParagraphElement/http://ns.adobe.com/textLayout/internal/2008::createTextBlock()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_core\src\flashx\textLayout\elements\ParagraphElement.as:100]
                at flashx.textLayout.elements::ParagraphElement/http://ns.adobe.com/textLayout/internal/2008::createContentElement()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_core\src\flashx\textLayout\elements\ParagraphElement.as:241]
                at flashx.textLayout.elements::SubParagraphGroupElement/http://ns.adobe.com/textLayout/internal/2008::setParentAndRelativeStart()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_core\src\flashx\textLayout\elements\SubParagraphGroupElement.as:178]
                at flashx.textLayout.elements::LinkElement/http://ns.adobe.com/textLayout/internal/2008::setParentAndRelativeStart()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_core\src\flashx\textLayout\elements\LinkElement.as:495]
                at flashx.textLayout.elements::FlowGroupElement/replaceChildren()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_core\src\flashx\textLayout\elements\FlowGroupElement.as:764]
                at Function/http://adobe.com/AS3/2006/builtin::apply()
                at flashx.textLayout.elements::ParagraphElement/replaceChildren()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_core\src\flashx\textLayout\elements\ParagraphElement.as:302]
                at flashx.textLayout.edit::TextFlowEdit$/insertNewSPBlock()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_edit\src\flashx\textLayout\edit\TextFlowEdit.as:655]
                at flashx.textLayout.edit::TextFlowEdit$/makeLink()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_edit\src\flashx\textLayout\edit\TextFlowEdit.as:503]
                at flashx.textLayout.operations::ApplyLinkOperation/doOperation()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_edit\src\flashx\textLayout\operations\ApplyLinkOperation.as:146]
                at flashx.textLayout.edit::EditManager/doInternal()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_edit\src\flashx\textLayout\edit\EditManager.as:418]
                at flashx.textLayout.edit::EditManager/doOperation()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_edit\src\flashx\textLayout\edit\EditManager.as:321]
                at flashx.textLayout.edit::EditManager/applyLink()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_edit\src\flashx\textLayout\edit\EditManager.as:1137]
        public function test_undo():void
            var init:XML = <TextFlow xmlns="http://ns.adobe.com/textLayout/2008"><p><span>aaa</span></p></TextFlow>
            var textFlow:TextFlow = TextConverter.importToFlow(init, TextConverter.TEXT_LAYOUT_FORMAT)
            var undoManager:IUndoManager = new UndoManager()
            var editManager:IEditManager = new EditManager(undoManager)
            textFlow.interactionManager = editManager
            editManager.selectRange(1,2)
             var format:TextLayoutFormat = new TextLayoutFormat()
            format.fontWeight = FontWeight.BOLD
            editManager.applyLeafFormat(format)
            undoManager.undo() // throws error:
            TypeError: Error #1009: Cannot access a property or method of a null object reference
                at flashx.textLayout.edit::EditManager/performUndo()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_edit\src\flashx\textLayout\edit\EditManager.as:540]
                at flashx.textLayout.operations::FlowOperation/performUndo()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_edit\src\flashx\textLayout\operations\FlowOperation.as:181]
                at flashx.undo::UndoManager/undo()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_edit\src\flashx\undo\UndoManager.as:197]            

    For your second issue, you didn't display TextFlow before you selected the Text.  I also changed the FontWeight.BOLD to "bold" in order to pass compilation.  The code below should work:
    var  
    var controllerOne:ContainerController = new ContainerController(container, 500, 500); 
    var undoManager:IUndoManager = new UndoManager() 
    var init:XML = <TextFlow xmlns="http://ns.adobe.com/textLayout/2008"><p><span>aaa</span></p></TextFlow>  
    var textFlow:TextFlow = TextConverter.importToFlow(init, TextConverter.TEXT_LAYOUT_FORMAT) 
    addChild(container);
    textFlow.flowComposer.addController(controllerOne);
    textFlow.flowComposer.updateAllControllers();
    var editManager:IEditManager = new EditManager();textFlow.interactionManager = editManager;
    editManager.selectRange(1,2)
    var format:TextLayoutFormat = new TextLayoutFormat();format.fontWeight ="bold";container:Sprite = new Sprite(); 
    editManager.applyLeafFormat(format);
    undoManager.undo();
    textFlow.flowComposer.updateAllControllers();

  • Unit test with JUnit

    Hi all,
    I use Eclipse IDE: Eclipse Java EE IDE for Web Developers. Version: Indigo Release
    I use JUnit 4. For project properties> Java Build Path> Libraries: I have JUnit4 added. Also under the same tab: Maven Dependencies> I have junit-4.8.2.jar
    In pom.xml I have:
    <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>4.8.2</version>
          <scope>test</scope>
        </dependency>Basically, I’m writing unit tests using JUnit in the past few months! All I needed to do was to create a test class, add a test method like below:
    @Test
    public void testMethod(){
              // Some test code
    }Right click on method, Run As> JUnit Test
    That’s all I needed to do to either run my unit test or do Debug As> Junit Test to debug my unit test.
    All was fine with the world! Starting yesterday, when I add a new test method in a test class, and then do: Right click on method, Run As> JUnit Test
    Nothing happens! I cannot run or debug any test anymore! Meaning I cannot add any new unit test!
    Let me also add that after I add my test method, I do a clean build thru Eclipse and Eclipse sees the newly complied class which contains my new test method.
    Since none of my configurations changed, I have no idea what went wrong!
    Does anybody has any idea? Any help would be greatly appreciated.

    aksarben wrote:
    Yes, I have an idea: Post your code. I for one am not going to my waste my time speculating and guessing.Could also just be IDE crud. I've had similar problems with older versions of Eclipse. Never with current ones though.
    OP: eclipse creates run/debug configurations for each class. If you search around a little you should find the dialog, I don't know the exact name. I think you can reach it from the "run as" menu options. You should try clearing the settings of your test suite to see if that changes anything.

  • Unit test with Dynamic Value Query

    Hi,
    I am planing a function which should return a table name for a given ROWID. The ROWID will be selected from a view. Now I am trying to setup a unit test which consists of Startup and Teardown Process as well as a Dynamic Value Query. During Startup Process one dataset is inserted in a table which is part of a view definition. The dataset should be selected during Dynamic Value Query. However I am getting the following error message: Unable to run the test because no rows were returned by the dynamic query. Is there the possibility that within a Dynamic Value Query I can't make use of datasets which where inserted by a Startup Process? I am asking because the selection outside the unit testing framework supplies the dataset as expected.
    SQL Developer: 3.2.20.09 Build MAIN-09.87
    Java: 1.6.0_45
    Regards.

    Dynamic SQL is very tricky.  Since you can get the data outside your application extract and test the dynamic SQL as it is generated.  When working with dynamic SQL I find it useful to first generate the SQL text as a string and then if necessary store it in a table (CLOB type) for later reference.  Because of the uncertainty of obtaining bind variable values later I prefer to hard-code such values into dynamic SQL - possibly slightly less efficient for Oracle at run time but a lot easier to work with when debugging and tuning (again, apart from the built-in inefficiency of not using bind variables)  I usually find the overhead of the hard-coded values not too bad and the ability to know the data values at a glance useful.  I also find it useful to write dynamic SQL in such a way so that the resulting statement can be pasted in to any normal SQL tool (SQL*PLUS, SQL*Developer) and run without any editing.
    There may be some quirk in the generated dynamic SQL preventing it from finding anything.
    Good luck.

  • Xtext Unit tests with JUnitParam

    Hey,
    I do some testing with Xtext. Somehow I ended up with a lot of boilerplate code and would like to get rid of it by using JUnitParam. Both Xtext and JUnitParam require the use of @RunWith annotation.
    @RunWith(JUnitParamsRunner.class)
    @RunWith(XtextRunner)
    class MyDslValidationTest {
    // test code ...
    This will not work ... How do I get both to work ?
    Thank you.
    Kon

    Thank you Christian Just in case if someone else is having the same issue:
    import com.google.inject.Inject
    import junitparams.JUnitParamsRunner
    import junitparams.Parameters
    import org.eclipse.xtext.formatting.INodeModelFormatter
    import org.eclipse.xtext.formatting.impl.DefaultNodeModelFormatter
    import org.eclipse.xtext.junit4.util.ParseHelper
    import org.eclipse.xtext.resource.XtextResource
    import org.eclipse.xtext.util.Pair
    import org.eclipse.xtext.util.Tuples
    import org.junit.Before
    import org.junit.Test
    import org.junit.runner.RunWith
    import static extension org.assertj.core.api.Assertions.*
    @RunWith(JUnitParamsRunner)
    class TestFormatterTest {
    @Inject extension ParseHelper<Model> parseHelper = new ParseHelper
    @Inject extension INodeModelFormatter nodeModelFormatter = new DefaultNodeModelFormatter
    @Before
    def void before() {
    var i = new TestStandaloneSetup().createInjectorAndDoEMFRegistration
    i.injectMembers(parseHelper)
    i.injectMembers(nodeModelFormatter)
    @Test
    @Parameters
    def void testFormat(Pair<CharSequence, CharSequence> pair) {
    pair.first.assertFormattedAs(pair.second)
    def static parametersForTestFormat() {
    Tuples.create('''test { bla }''',
    '''test {
    bla
    def void assertFormattedAs(CharSequence input, CharSequence expected) {
    (input.parse.eResource as XtextResource).parseResult.rootNode.format(0, input.length).formattedText.assertThat.
    isEqualTo(expected)

  • UIX Unit Test with HttpUnit

    Hi
    I would like to test my UIX pages with HttpUnit. I am always having an exception while trying to get a page. Here is my code:
    package mypackage;
    import com.meterware.httpunit.TableCell;
    import com.meterware.httpunit.WebTable;
    import junit.framework.TestCase;
    import com.meterware.httpunit.GetMethodWebRequest;
    import com.meterware.httpunit.WebConversation;
    import com.meterware.httpunit.WebRequest;
    import com.meterware.httpunit.WebResponse;
    public class TestThree extends TestCase
    public TestThree(String name)
    super(name);
    public void testTable() throws Exception
    WebConversation webConversation = new WebConversation();
    WebRequest request = new GetMethodWebRequest("http://localhost:8988/HttpUnitTest-View-context-root/table.do");
    WebResponse response = webConversation.getResponse(request);
    Here is the exception thrown:
    ReferenceError: "event" is not defined.
         at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:597)
         at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:557)
         at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1076)
         at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2265)
         at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:58)
         at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.performEvent(JavaScript.java:172)
         at com.meterware.httpunit.scripting.ScriptableDelegate.doEvent(ScriptableDelegate.java:56)
         at com.meterware.httpunit.WebResponse$Scriptable.load(WebResponse.java:689)
         at com.meterware.httpunit.javascript.JavaScript.load(JavaScript.java:89)
         at com.meterware.httpunit.javascript.JavaScriptEngineFactory.load(JavaScriptEngineFactory.java:58)
         at com.meterware.httpunit.RequestContext.runScripts(RequestContext.java:44)
         at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:122)
         at com.meterware.httpunit.WebClient.getResponse(WebClient.java:113)
         at mypackage.TestThree.testSailorsTable(TestThree.java:19)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at junit.framework.TestCase.runTest(TestCase.java:154)
         at junit.framework.TestCase.runBare(TestCase.java:127)
         at junit.framework.TestResult$1.protect(TestResult.java:106)
         at junit.framework.TestResult.runProtected(TestResult.java:124)
         at junit.framework.TestResult.run(TestResult.java:109)
         at junit.framework.TestCase.run(TestCase.java:118)
         at junit.framework.TestSuite.runTest(TestSuite.java:208)
         at junit.framework.TestSuite.run(TestSuite.java:203)
         at junit.framework.TestSuite.runTest(TestSuite.java:208)
         at junit.framework.TestSuite.run(TestSuite.java:203)
         at junit.swingui.TestRunner$16.run(TestRunner.java:623)
    Any help would be welcomed.

    My question is more precisely if Sql Developer takes into account an argument like type Table Of Record, or an argument like type ...%ROWTYPE (knowing there is no problems with an argument like type Record)
    Thank you for your answers.

  • Re: Unit Tests with Jemmy

    I have a need for running headless beyond just for testing. I'd like to make a library that uses JavaFX properties/tasks that can either run headless, or can use the same tasks to run in a GUI that can display the progress info generated by the tasks. javafx.concurrent.Task seems perfect, except that when I try to run a task inside a maven mojo, I get:
    java.lang.IllegalStateException: Toolkit not initialized
    I'm currently running JavaFX 2.2.7 on OS X 10.8.3.
    Is there a way to enable properties/Task in a headless environment on 2.2.7? Will there be a way for 8.0?
    I don't need to run any GUI stuff headless, I just want to use the excellent JavaFX properties model in a way that is reusable across GUI and headless environments.
    Thanks,
    Keith

    I would create a feature request here if it https://javafx-jira.kenai.com/secure/Dashboard.jspa if it doesnt' exist. You can download the Java 8 builds here http://jdk8.java.net/
    Also your error for some other unknown reasons, though I'm, not too sure...
    Btw since you replied to my other topic, what's a headless :P?

  • SMP 2.3.3 Hybrid Web container testing with iOS 8 beta

    Hi Experts,
    Our HWC container version is 2.3.3.6966 and our SMP version is 2.3.3
    Any help will be much appreciated.
    Thanks and Regards,
    Sreeni Jayapal.
    Message was edited by: jitendra kansal

    In SAP support portal, we can only see up to SMP 2.3 SP04PL01, from where we can download this patch?
    Is this patch (SMP 2.3 SP04PL02) solve the HWC application compatibility issue with iOS8?
    Thanks
    Fibeesh

  • BeginTimer and EndTimer Not Working In Data-Driven Unit Test Using DataSource Attribute

    Using VS2012 Ultimate I have a unit test with the <DataSource> attribute which passes in values from a CSV file.  I'm wrapping the unit test in a load test.  I expect a Transaction to appear in the load test results for each row in my DataSource
    due to the BeginTimer and EndTimer methods in the unit test.  However, I only get 1 transaction, with response time roughly equal to the overall test time.  For example, if each row in the DataSource takes 1 second to process, then my test time and
    transaction time would be about 10 seconds with 10 rows in the CSV file.
    I've created a load test with Constant Load Pattern, 1 user, and 1 test iteration.  Seeing the behavior described above.
    I have tried with and without and the check for $LoadTestUserContext.  I'm only using that because I get a NotSupportedException when running the unit test on its own.  I can't believe this bug still
    exists, but that is another topic.
    Note also that I cannot see the Debug output in the Output window in VS2012.
    Any tips?  Thank you.
        <TestMethod()>
        <DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\TestData\MyValues.csv", "MyValues#csv", DataAccessMethod.Sequential)>
        Public Sub WebServiceTest()
            Dim service As MySvc = New MySvcClient()
            Dim input As MyInput = New MySvcInput()
            input.A = testContextInstance.DataRow("A")
            input.B = testContextInstance.DataRow("B")
            Dim g As Guid = Guid.NewGuid()
            If TestContext.Properties.Contains("$LoadTestUserContext") Then 'running as load test
                TestContext.BeginTimer("MySvcTrans")
                Debug.WriteLine("Begin Transaction MySvcTrans:  {0}", g)
            End If
            Dim output As MySvcOutput = service.Method(input)
            If TestContext.Properties.Contains("$LoadTestUserContext") Then 'running as load test
                Debug.WriteLine("End Transaction MySvcTrans:  {0}", g)
                TestContext.EndTimer("MySvcTrans")
            End If
            Assert.AreEqual(0, output.ReturnCode)
        End Sub

    Hi John,
    >> I expect a Transaction to appear in the load test results for each row in my DataSource due to the BeginTimer and EndTimer methods in the unit test.  However, I only get 1 transaction, with response time roughly equal to the overall test
    time.
    Could you share me a screen shot about the reslut in load test?
    Could you share us the load test result in "Transaction"Tables?
    About how to use the
    Transaction for unit tests, maybe you could get useful informaiton here:
    http://blogs.msdn.com/b/slumley/archive/2006/04/14/load-testing-web-services-with-unit-tests.aspx
    Best Regards,
    Jack
    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.

  • Support for unit testing object types

    There's a Feature Request that suggests expanding the unit test tool to object types:
    Title
    Provide object type support for unit tests
    Description
    In the current version (2.1.0.63) I can perform only unit test for packages, function and procedures. But we use a lot of object types in the database and would like to test them. When is a support for object types scheduled?
    Average Rating
    10
    Development Comment
    This is planned for the next release.
    Status
    Scheduled for 3.0
    Although the status suggests inclusion in v3, in my current version 3.2.20.09 there is nothing.
    This is clearly an important issue for those who have voted for it as it scores a perfect 10 on average rating.
    Is there any sign of object types being supported in the 4.0EA1 release? There is a strong desire within my organisation to move to a more object-based approach to PL/SQL coding but until we are able to unit test easily there will be no real progress.

    If you are ready to learn a little bit of Ruby then you can try [PL/SQL unit testing with Ruby|http://blog.rayapps.com/2009/11/27/oracle-plsql-unit-testing-with-ruby/]. ruby-plsql library [supports also PL/SQL object types|http://blog.rayapps.com/2009/11/25/more-oracle-data-types-supported-by-ruby-plsql-gem/] as input and output parameters and return values.

  • Unit Test Framework Crashing LabVIEW Project

    [Cross posted to LAVA]
    OS: Windows 7
    LabVIEW 2009, LabVIEW 2009 SP1. 
    Howdy
    If I create a project and add a VI and a unit test to it and save it, then delete the unit test, everything works.
    If I do the above but put the unit test in a virtual folder then delete it, the project hangs and LabVIEW crashes.
    I have tried this on multiple computers and get the same effect.
    If it is an issue I thought this may have been fixed in 2009 SP1, but it is not.
    I do not remember this happening in 8.6.1 but I was using VISTA at the time (if that is related?)
    I get the same problem if I open an existing project with unit tests in it. 
    Additionally I have noticed that the files from the unit test in Windows 7 have no "logo/icon" associated with them. I thought in VISTA they had the same icon as what is shown in the project - the green plus sign (but this was a while ago). 
    Is this a known issue / can anyone else confirm this? 
    Cheers
    -JG 
    Message Edited by jg-code on 04-13-2010 10:02 PM
    Certified LabVIEW Architect * LabVIEW Champion

    Hi Kyle 
    Thank you for your quick reply.
    I am having this problem on my work PC, home PC and a colleague's PC all running Windows 7 and 2009 SP1.
    I have found the problem occurs if I create a new unit test OR drag and drop an existing unit test into the project.
    Attached is a (jing) video of what is happening every time.
    You will see that at the root level of the project (My Computer), I can remove the unit test with no problems at all.
    But if it goes into a virtual folder and I try to remove it - then LabVIEW crashes. 
    The attachment is in LV2009.SP1 and is the sane project as used in the video.
    I look forward to your feedback on resolving this issue I am having.
    Cheers
    -JG 
    Certified LabVIEW Architect * LabVIEW Champion
    Attachments:
    Test Project.zip ‏4 KB

Maybe you are looking for

  • Sending email with APEX

    Hello I would like to use a remote SMTP mail sever with Oracle XE on a standalone PC I have a choice of 2 mail servers Yahoo Outgoing Mail Server (SMTP) - smtp.mail.yahoo.com (port 25) Outgoing Mail Server - smtp.gmail.com (SSL enabled, port 465) whi

  • How to Open Hyperlink from helpset files in new Browser .

    Hi, I am using JavaHelp2.0_5, and i have created all the help-set files and its working fine with my application. When i click on an hyperlink of my help documents that is rendered in help editorpane it opened on the same editor pane. But now i need

  • Limited characters in textarea using swings

    Hi, i have one text area that is created using swings technologies now this text area need to allow only 30 characters perline and limit of the text area is maxmium of 500 characters. i have done some coding but it breaks whenever the copy/paste happ

  • How can I create a details cube with millions records

    Hello everyone, I need now to create a cube for details data. But the problem is that the details data is very large. There are some millions records. How can I design such cube in the essbase? Or can man create such cube in the essbase at all? I nee

  • How can I increase the font size in Reminders

    Is there any hack, tweak or 3rd party software to increase the font size in Reminders. It is really tiny and can't enlarge even on a huge display.