Current Position:Home > Receiving trace()-statements in the TestRunner

Receiving trace()-statements in the TestRunner

Update:11-30Source: network consolidation
Advertisement
First of all I would like to say I am totallynew to the use of unit testing in general. I am currently evaluating FlexUnit and using the TestRunner.mxml for running the tests. I am only curious how I can let the FlexUnit ant task also show my trace()-statements. Because that makes it easier to fix issues in the code. Now I need to switch the normal application and compile it to check the trace output in the console. Only for working on the implementation and/or fixing one unit test case.
Anyone happen to have some ideas or suggestions how to get this going?

The Best Answer

Advertisement
Hmm, then I have to be doing something wrong because it's not displayed...
I am using the flexUnit ant task in the following action as noteed below. The DEBUG_MODE is variable is currently set to true and works in the normal application as expecteed.
<target name="unittest">
        <echo message="Loading the FlexUnit ant task at location: ${BUILDER_DIR}/flexUnitTasks.jar..." />
        <echo>Executing the unit tests of the project in /tests directory...</echo>
        <mxmlc file="${TESTS_DIR}/src/TestRunner.mxml" output="${TESTS_DIR}/TestRunner.swf"
                actionscript-file-encoding="UTF-8"
                incremental="false"
                debug="${DEBUG_MODE}" strict="true" optimize="true"
                use-network="${NETWORK_ACCESS}"
                default-frame-rate="${FRAME_RATE}"
                default-background-color="${BACKGROUND_COLOR}">
          <source-path path-element="${APP_ROOT}" />
          <source-path path-element="${LIBRARY_SRC_DIR}" />
          <library-path dir="${LIBRARY_SWC_DIR}" append="true">
              <include name="*.swc" />
          </library-path>
          <library-path dir="${TESTS_DIR}/lib" append="true">
              <include name="*.swc" />
          </library-path>
          <compiler.verbose-stacktraces>true</compiler.verbose-stacktraces>
          <compiler.headless-server>true</compiler.headless-server>
        </mxmlc>
        <flexunit swf="${TESTS_DIR}/TestRunner.swf" toDir="${TESTS_REPORTS_DIR}" haltonfailure="false" verbose="true" headless="true" localTrusted="true" />
    </target>
If I execute this task I am getting the following output from Apache Ant:
unittest:
     [echo] Loading the FlexUnit ant task at location: E:\project1\workspace\flash/../dev/automation/flash/flexUnitTasks.jar...
     [echo] Executing the unit tests of the project in /tests directory...
    [mxmlc] Loading configuration file C:\Program Files\Adobe\Flex Builder 3 Plug-in\sdks\3.5.0\frameworks\flex-config.xml
    [mxmlc] E:\project1\workspace\tdd\TestRunner.swf (818409 bytes)
[flexunit] Validating task attributes ...
[flexunit] Generating default values ...
[flexunit] Using default snapshot file path [E:\project1\workspace\tdd\reports\snapshot.jpg]
[flexunit] Using the following settings:
[flexunit]     haltonfailure: [false]
[flexunit]     headless: [true]
[flexunit]     localTrusted: [true]
[flexunit]     player: [flash]
[flexunit]     port: [1024]
[flexunit]     snapshot: [false]
[flexunit]     snapshotFile: [E:\project1\workspace\tdd\reports\snapshot.jpg]
[flexunit]     swf: [E:\project1\workspace\tdd\TestRunner.swf]
[flexunit]     timeout: [60000ms]
[flexunit]     toDir: [E:\project1\workspace\tdd\reports]
[flexunit]     verbose: [true]
[flexunit]     xcommand: [xvfb]
[flexunit] Setting up server process ...
[flexunit] Starting server ...
[flexunit] OS: [Windows]
[flexunit] Opening server socket on port [1024].
[flexunit] Waiting for client connection ...
[flexunit] Launching player:
[flexunit] Executing 'rundll32' with arguments:
[flexunit] 'url.dll,FileProtocolHandler'
[flexunit] 'E:\project1\workspace\tdd\TestRunner.swf'
[flexunit] The ' characters around the executable and arguments are
[flexunit] not part of the command.
[flexunit] Created local trust file at [C:\Windows\system32\Macromed\Flash\FlashPlayerTrust\flexUnit.cfg]
[flexunit] Client connected.
[flexunit] Setting inbound buffer size to [262144] bytes.
[flexunit] Receiving data ...
[flexunit] Sending acknowledgement to player to start sending test data ...
[flexunit] FlexUnit test testDecimals in suite tests.CurrencyHelperTests failed.
[flexunit] FlexUnit test testRoundingEqual in suite tests.CurrencyHelperTests failed.
[flexunit] FlexUnit test testRoundingBelowWithinMargin in suite tests.CurrencyHelperTests failed.
[flexunit] FlexUnit test testRoundingAboveWithinMargin in suite tests.CurrencyHelperTests failed.
[flexunit] FlexUnit test testThousands in suite tests.CurrencyHelperTests failed.
[flexunit] FlexUnit test testDecimalsAboveMargin in suite tests.CurrencyHelperTests failed.
[flexunit] FlexUnit test testRoundingBelow in suite tests.CurrencyHelperTests failed.
[flexunit]
[flexunit] Stopping server ...
[flexunit] End of test data reached, sending acknowledgement to player ...
[flexunit] Closing client connection ...
[flexunit] Closing server on port [1024] ...
[flexunit] Analyzing reports ...
[flexunit]
[flexunit] Suite: tests.CurrencyHelperTests
[flexunit] Tests run: 8, Failures: 7, Errors: 0, Skipped: 0, Time elapsed: 0 sec
[flexunit]
[flexunit] Results :
[flexunit]
[flexunit] Tests run: 8, Failures: 7, Errors: 0, Skipped: 0, Time elapsed: 0 sec
I am missing the trace()-statement I have in the class which gets tested by the unit test:
trace("decimals=" + ( value - int( value ) ) + " == " + decimalsRounded );
  • Receiving trace()-statements in the TestRunner Update:11-30

    First of all I would like to say I am totallynew to the use of unit testing in general. I am currently evaluating FlexUnit and using the TestRunner.mxml for running the tests. I am only curious how I can let the FlexUnit ant task also show my trace()

  • BPM:  System_Error" SOAP fault message received Update:10-11

    Hi, We upgraded SAP system from 4.7 to ERP2004 on 09/17/05. We have XI-3.0 version from last 9 months and this BPM was working good so far. We have not changed anything in it except we upgraded the SAP system. We are using ABAP proxy from SAP to send

  • WS To IDOC"CONTENTS OF TRACE IN SXMB_MONI" Update:10-11

    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <!--  Response   --> - <SAP:Trace xmlns:SAP="http://sap.com/xi/XI/Message/30">   <Trace level="1" type="T">Party

  • IDOC - BPM - IDOC  Error --no sender or receiver interface definition found Update:10-11

    I have an integration scenario, IDOC - BPM - IDOC. SAP will send ACC_GL_POSTING IDOC to XI, a BPM will start and then the BPM will send an IDOC to another SAP system. I have read instructions on weblogs: /people/pooja.pandey/blog/2005/07/27/idocs-mul

  • IDOC to abap proxy- Receiver Service Cannot be converted into ALE logical Update:10-11

    Dear all, I have idoc to abap proxy  - R3 to SRM scenario. I am getting the error Receiver service cannot be converted to ale logical system. I have check the receiver bs SRM_BS , adapter specific attributes ... im getting the logical system ( this i

  • XML Monitor: no interface action for sender or receiver found Update:10-11

    Hi, I am new to XI and currently working on Supplier Network Collaboration ( SNC) to Integrate PO's from ECC to SCM system via XI. I have successfully triggered PORDCR1 message for which I was able to see the XML message in XI. The message is stuck o

  • Interface Determination causing issue in Receiver Determination Update:10-11

    Hi I am having an issue with interface and receiver determination as follows: - Inbound message may be sent to two receivers. - Message gets sent to first receiver, fails during interface determination. There are multiple inbound interfaces found bas

  • Error: no interface action for sender or receiver found Update:10-11

    Hello, I have configured a asynchronous RFC to JDBC scenario. When i try to execute the end to end scenario , the message in SXMB_MONI is with a green flag(scheduled)  and queue status is yellow and when i double the message , the trace shows followi

  • NO INTERFACE ACTION FOR SENDER OR RECEIVER FOUND Update:10-11

    Hi Masters of SRM Into SRM/SUS client received an message XML across XI the  SXMB_MONI  in trace section show the next message <!-- ************************************ --> <Trace level="3" type="T">Persisting message Statu

  • Receiver Update:11-30

    I have a prob;em with my receiver identification... I have an RFC to RFC scenario. In my design I imported first from the sender system the sender RFC structure then I changed the parameters for import in my swcv so that I could import my target rfc