Supplying parameters in a request to run a parameterized request?

Hi all,
I was wondering if there was a way to include the parameters to pass to a parameterized test in a request to run that parameterized test. If a test is parameterized, adding the request returned by Request.method() to the list of requests passed to FlexUnitCore.run() will cause the parameterized test to be run once for each item returned by the parameterized test's [Parameters] method. I don't know of a way to create a request to pass to FlexUnitCore.run() which would run a test once, with specific parameters passed to the test.
For example, here's a simple parameterized test:
package
     import org.flexunit.runners.Parameterized;
     [RunWith("org.flexunit.runners.Parameterized")]
     public class SimpleParameterizedTest
          private var _param:int = 1;
          public function SimpleParameterizedTest(param:int)
               _param = param;
          [Parameters]
          public static function getData():Array
               return [[1], [2], [3]];
          [Test]
          public function runTest():void
               trace(_param);
If I run the test with this code:
               var flexUnitCore:FlexUnitCore = new FlexUnitCore();
               var request:Request = Request.method(SimpleParameterizedTest, "runTest");
               flexUnitCore.run(request);
... then SimpleParameterizedTest's constructor is called three times, first with 1, then with 2, and finally with 3, and runTest() is called three times. What I would like to do is, e.g., to create a request that would cause the constructor to SimpleParameterizedTest to be called once with a value of 2.
We have a set of large files and real-world files which we use in performance tests - e.g., to time opening, saving, and closing. We have a set of parameterized tests which take these files as inputs: each of the [Parameter] methods for these tests gets the contents of a folder, and returns a list of filenames which match a particular pattern. Our test automation system has a UI which allows a dev or QE to select the set of tests to run, but without modifying the contents of the folders the tests look in, there is not a way for him or her to select a subset of these parameterized tests to run. Similarly, we would like our test automation which executes the performance tests to be able to run a test on a particular file.
If there is not a way to include the parameters in the request, our plan is to modify the [Parameters] method for the test so that the test can ask the test automation system for the parameters and (e.g.) return a list generated by the contents of a folder if the test automation system does not have parameters.

You could use the external data loading feature of the test runner and then just write a file ahead of time (or use an in memory static class if you wanted)
http://tutorials.digitalprimates.net/flexunit/Unit-11.html
Scroll down to using external data. Read that first (briefly) it builds on the knoweldge taught here:
http://tutorials.digitalprimates.net/flexunit/Unit-9.html
You could use this interface to wedge your data in, either via an external file, remote call, or even just populate a static class before you call run and use this technique to draw it out.
That is my best suggestion,
Mike

Similar Messages

  • How to schedule a concurrent request to run at a specified time/day?

    Hi All,
    How to schedule a concurrent request to run at a specified time/day (ex: Sunday 12pm)?
    Thanks,
    Chiru
    Message was edited by:
    Megastar_Chiru

    Is this to run periodically ?
    During the request submission, click schedule, choose the specific days, and click on S = Sunday.
    Change the start date on the date of the sunday you want to run, eg : 15-JUL-07 14:00:00, change the end date as well.

  • XML PrintSelectedInvoices completes with warning when run as child request

    Hi Friends,
    I have converted the print selected invoices to xml and it runs fine when run by itself through SRS but it fails when it is submitted as a child request ( when it gets run as a child request when Invoice import and print program is run). Here is the problem:
    1)When request is submitted, through SRS it passes fine and while submitting I find the template name,template language in theoptions button: Upon completion �Window:(UNDER LAYOUT section)
    2)BUT When request is submitted as child request it fails and while submitting this; Ifind that there is no information in the layout section in the options: Uponcompletion �Window:(UNDER LAYOUT SECTION).You will see that there is notemplate name,template language etc. and details picked in the Upon Completionwindow under OPTIONS buton in SRS.
    Also the error in the log file is as follows:
    Printing output file.
    Request ID : 41921527
    Number of copies : 1
    Printer : 11111
    Error: May not be a PDF file (continuing anyway)
    Error (0): PDF file is damaged - attempting to reconstruct xref table...
    Error: Couldn't find trailer dictionary
    Error: Couldn't read xref table
    Pasta: Error: Preprocess failed. Command=/usr/testinstance/temp/pasta13459_0.tmp /n00/common/testinstance/temp/pasta13459_1.tmp
    Pasta: Error: Preprocess or Print command failed!!!
    APP-FND-00500: AFPPRN received a return code of failure from routine FDUPRN. Program exited with status 1
    Cause: AFPPRN received a return code of failure from the OSD routine FDUPRN. Program exited with status 1.
    Regards
    Ray

    Register the template before using it.
    Once it is registered, you can call that report as a child request.
    Regards
    Ray

  • Request is running yellow with 0 records

    hi
    insource i have 14 records, i am running infopackge load to psa? i loaded immediately, its showing yellopw with 0-0 records.
    i deleted request and run again i am facing same problem what could be the reason

    Hi Suneel..........
    U hav checked the extraction job?................it is in released state..................right......
    Hav u checked the RFC connection(SM59).............is it ok........
    If still it is released state..............as already mentioned.................load at this time in ur system is huge................due to this there are no free work process...............u can try to change the server and then run the load....................Go to SM66...........there check which servers are showing in Waiting state............that means loads are not much in those servers..................then go to SM51.............double click on the desired server...............then in the top where we write tcode.........there write /n........................a new session will open...................now u r in the new server..........here again execute the load.....................it may progress here............but be careful.............since already one job is in schedule state.............after some time it may become active...........at that time u hav to cancel the job.................otherwise load will fail due to lock issue................
    Regards,
    Debjani.........

  • Request still running

    Hi Expert,
    I did extract data for SAP HR Recruitment from source system (SAP R/3) to Cube in BW 7.0, when I ran the InfoPackage, the message always with status "Request still running" (detail message --> missing message: Number of send message) until few hours, no data extracted to PSA.
    But the problem only in 0APPLICANT (text and attributes) datasource, no problem found in the others Recruitment datasources.
    I've to DataSource replication, delete/re-create infopackage, re-arrange transformation. And I've check source system using RSA3 and Applicant data available in the source system.
    I've check using SM50, the process always running but never finish (status always Yellow).
    Is there any solution for this problem ?
    Regards,
    Tri Wicaksono

    Hi....
    Have you checked the extraction job in the Source System ...........copy the request number ......go to the source system...........SM37......put *REQXXXXXXX........check whether the Job got completed or not.....
    Also , In the IP Monitor screen....in the Menu Bar ---> Settings --> Evaluation of requests (Traffic Lights) --> For the option " If no data is available in the system the request "......you should select "Status Successful".....by default it will be "Status Successful" only...until and unless someone change it manually....
    Also check for short dump and TRFC..........in both source system and data ware house.........in the Menu Bar --> Environment.......there you will get all the options....
    To check the Short Dumps.........you have search for the Request Number.....if it is there it means load went to short dump........
    If TRFCs are stucj press F6 to push it........
    After that also if it doesn't progress....it means it went to dump.....then change the stsus to red manually and repeat the load......
    Regards,
    Debjani.....

  • How to run all Concurrent Requests in a single node in a multi node env

    DB;11.1.0.7
    Oracle Apps:12.1.1
    OS:Linux 86x64 Red Hat
    PCP setting is enabled.
    Load Balancer is enabled.
    APPLDCP=ON
    Could anyone please share - How to run all Concurrent Requests in a single node in a multi node env where there are 3 web tier nodes?
    Thanks for your time!
    Regards,

    PCP setting is enabled.
    Load Balancer is enabled.
    APPLDCP=ON
    Could anyone please share - How to run all Concurrent Requests in a single node in a multi node env where there are 3 web tier nodes?Concurrent requests will be processed by the CM nodes and it has nothing to do with the 3 web tier nodes you have.
    If you mean the database instance, then please see these docs.
    How to run a concurrent program against a specific RAC instance with PCP/RAC setup? [ID 1129203.1]
    In A PCP/RAC Configuration, How To Find Out On Which RAC Instance FNDSM Is Currently Running? [ID 1089396.1]
    Thanks,
    Hussein

  • In Dreamweaver, I need to add the directory to the File being inserted in the following Insert Code:    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 255, Request.Form("DocLocation")) ' adVarWChar

    I have the following code:
    <%
    If (CStr(Request("MM_insert")) = "form1") Then
      If (Not MM_abortEdit) Then
        ' execute the insert
        Dim MM_editCmd
        Set MM_editCmd = Server.CreateObject ("ADODB.Command")
        MM_editCmd.ActiveConnection = MM_NewFLSSARDB_STRING
        MM_editCmd.CommandText = "INSERT INTO DocumentTable (Title, DocLink, UpdatedBy, UpdateDate, Type, Comments) VALUES (?, ?, ?, ?, ?, ?)"
        MM_editCmd.Prepared = true
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 255, Request.Form("DocumentName")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 255, Request.Form("DocLocation")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 255, Request.Form("UpdatedBy")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 135, 1, -1, MM_IIF(Request.Form("UpdatedDate"), Request.Form("UpdatedDate"), null)) ' adDBTimeStamp
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 202, 1, 255, Request.Form("Type")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 203, 1, 1073741823, Request.Form("Comments")) ' adLongVarWChar
        MM_editCmd.Execute
        MM_editCmd.ActiveConnection.Close
        ' append the query string to the redirect URL
        Dim MM_editRedirectUrl
        MM_editRedirectUrl = "testFLSSARSuperAdminIndex.asp"
        If (Request.QueryString <> "") Then
          If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
            MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
          Else
            MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
          End If
        End If
        Response.Redirect(MM_editRedirectUrl)
      End If
    End If
    %>
    For param2 above I need to add the directory "Docs/" to the command so that the file can be found by the User.  How do I do that?

    If all documents are going to the "/Docs" folder, then I wouldn't include it in the inserted data as you can just add it dynamically where needed. If you do want to include it and it's not part of the posted form data, then just concatenate it (&) prior to inserting into the table.

  • Request still running no idocs are arrived into BI

    Hi Experts,
    I'm working on EHP1[BI 7.01] and trying to load the data from R/3 system with generic data source. The records are updated in PSA[data source] and which is showing "12:25:21 ( 15 From 0 Records ) " and with yellow status with the below information.
    Request still running
    Diagnosis
    No errors found. The current process has probably not finished yet.
    System Response
    The ALE inbox of BI is identical to the ALE outbox of the source system
    or
    the maximum wait time for this request has not yet been exceeded
    or
    the background job has not yet finished in the source system.
    Current status
    No Idocs arrived from the source system.
    I checked different threads relating to this issue with different solutions like checking WE20, BD87, tRFC etc., but still i'm unable to resolve this.
    This is very urgent issue could anyone please help me in resolving this issue..
    Thanks & Regards,
    Amarnath

    I mean.. Once u press Source system.. it will ask u for the ID and PWD.. once u give that.. it will ask for the data range .. by default it will be todays date as ur has started today only.... and then execute...
    it will take u to SM58 screen.. there u just see the status of the different IDOC entries... if u can see the Executed as status then u can press F6 to push it to BW..
    If u see the status as Executing then u need to wait as the operation is still running....
    .. In practive if u feel that this load is taking long time compared to the actual.. then u can go ahead with the the repeat of the load by killing the present load in the source system.. and removing the bad req from the ur target..
    thanks
    Hope this helps.

  • QM & Technical Status are RED thouh request is running

    Hi,
    I have one request which is running even now-- (load to ODS)
    in the monitor the request is running but in the manage tab of the data target both traffic lights of technical And QM status were RED!
    Before the load was scheduled i had changed the ODS settings to see the QM status automatically and activate the ODS data data automatically.
    This is very huge dataload and if there is anything wrong then i need to change it immedietly ! it takes nearly 40 hours to finsih this load--
    Should there anything to change or is it OK?
    Raj

    Hi Raj
    In General the moment you made the Qm status to RED it is
    automatically stop all the related jobs or process in some
    pecular cases you to kill the process via SM 50 . Just conatc t
    your BASIS people immdeiately on this and ask themn to kill
    the process related to the request.
    And do the rest of the process like deltion of the request or
    what ever...
    Hope it helps you ..!
    Cheers
    K M R
    Assigning points is the only way of saying thanx in SDN***
    >
    Raj Karan wrote:
    > Hi,
    >
    > I have one request which is running even now-- (load to ODS)
    >
    > in the monitor the request is running but in the manage tab of the data target both traffic lights of technical And QM status were RED!
    >
    > Before the load was scheduled i had changed the ODS settings to see the QM status automatically and activate the ODS data data automatically.
    >
    > This is very huge dataload and if there is anything wrong then i need to change it immedietly ! it takes nearly 40 hours to finsih this load--
    >
    > Should there anything to change or is it OK?
    >
    > Raj

  • Getting a 502 Bad Gateway when trying to run a POST request for application on Lync UCWA on VPN

    I am getting a 502 Bad Gateway when trying to run a POST request for application info on Lync UCWA ("Policy prevents request from being proxied."). When I do a request without SSL, I get a 403 - Forbidden: Access is denied. 
    Is this becouse I am on VPN and not on the internal network? There are some policy on VPN or the IIS internal that denies me access?
    I have not tried it internal yet. Anyone else with this experience?

    Did you figure out your issue? I'm having a similar issue. Even thought I'm able to successfully sign-in to the Lync Server and obtain a Bearer token, I'm not getting any response from the server when sending a POST request to the application URI (https://<pool_fqdn>/ucwa/oauth/v1/applications).
    Wondering if it's a policy issue and if so, why user policy affects this access?
    thanks.

  • How to start Flash Media Encoder 3.2 from Flex application with run time parameters?

    Hello ,
    I'm developing the application to stream High Quality video.While streming by default camera/microphone settings the qulaity of streaming is not upto my expected level.I want to stream through Flash Media Encoder.My aim is the user login to the application.Video/audio qulaity details are retrived from shared object stored in the client machine.The login user name only gathered at run time & it will be the streaming profile name to Encoder.Once the the Encoder started the outgoing video will be come into screen to client.Please guide me How to start Flash Media Encoder 3.2 from Flex application with run time parameters(User name as  streaming name) without manually start the FME?
    Thanks in advance.
    Regards
    Sasharyuva

    Hi MarcSaphiron,
    Could you please send the samples?It will be much helpful to complete my
    job within the deadline.
    Thanks in advance.
    Regards,
    Sasharyuva

  • Request still running but?

    Hi,
    My request is running , but in the data target the request is set to green why?
    give me the solution
    and am not able to see the data in the data target
    data is there in PSA
    Thanx in advance,
    Ravi.

    Hi Ravi,
    Please check with the Tcode -SM37  whether your job is complete or not.
    If Your job is not complete then you are unable to see the data .
    If your job is complete and request is still running then kindly check the log of the  you job in sm37 only from that you can come to the detail that why the status is green and the request is still running.
    Rgds,
    Hirdesh Gupta

  • CreateAuthenticatedSessionToken: The signature of the request does not match the request parameters

    I'm creating an app using the SODA Architecture. 
    I could successfully create an app and make the client to authorize it. 
    Result of newApplicationCreationInfo:
    <?xml version="1.0" encoding="UTF-8"?>
    <response>
    <status>
    <code>0</code>
    </status>
    <wc:info xmlns:wc="urn:com.microsoft.wc.methods.response.NewApplicationCreationInfo">
    <app-id>4417587e-46d1-49ee-a0fa-50dbfdcf932c</app-id>
    <shared-secret>gBksYDAqcuAUXK+zyvfFW9F0sy8nchwnplJ6K7aKmAM=</shared-secret>
    <app-token>AiAAANDl....A5b9fxVIlXEloouci6jGhY/A==</app-token>
    </wc:info>
    </response>
    I'm using the app-token to build the redirect url, and I get to authorize the new app. 
    then, using the new child app id and the shared-secret I built the 
    CreateAuthenticatedSessionToken:
    <?xml version="1.0" encoding="UTF-8"?>
    <wc-request:request xmlns:wc-request="urn:com.microsoft.wc.request">
    <header>
    <method>CreateAuthenticatedSessionToken</method>
    <method-version>2</method-version>
    <app-id>4417587e-46d1-49ee-a0fa-50dbfdcf932c</app-id>
    <language>en</language>
    <country>US</country>
    <msg-time>2013-01-01T00:00:00Z</msg-time>
    <msg-ttl>1800</msg-ttl>
    <version>2.0.0.0</version>
    </header>
    <info>
    <auth-info>
    <app-id>4417587e-46d1-49ee-a0fa-50dbfdcf932c</app-id>
    <credential>
    <appserver2>
    <hmacSig algName="HMACSHA256">PcW4f9krD1O43O4JGBGEkqDlpatFIUUQY9JejHji0XA=</hmacSig>
    <content>
    <app-id>4417587e-46d1-49ee-a0fa-50dbfdcf932c</app-id>
    <hmac>HMACSHA256</hmac>
    <signing-time>2013-12-17T14:19:58.623Z</signing-time>
    </content>
    </appserver2>
    </credential>
    </auth-info>
    </info>
    </wc-request:request>
    Being hmacSig value the encryption of "<content>....</content>" using shared-secret value as private key:
    hmacSig = Encodingutil.base64Encode(Crypto.generateMac('hmacSHA256', Blob.valueOf(body), Blob.valueOf(sharedSecret)))
    this returns an error code 11: The signature of the request does not match the request parameters.
    I'm using the following endpoint: https://platform.healthvault-ppe.com/platform/wildcat.ashx
    Also the redirection url I received after authorizing the app contains the following: 
    https://<MY_URL>/?gws_rd=cr&ei=h5ewUuKLJa7IsASc4YHIAw I'm not using this parameters, if that helps.
    Any hint will be greatly appreciated.
    UPDATE: I already checked the HMAC encoding using a third party service and it returned the same as my app

    I figured this out (God bless Pair Programming):
    I was signing incorrectly: 
    On the newApplicationCreationInfo:
    My Shared Secret is : gBksYDAqcuAUXK+zyvfFW9F0sy8nchwnplJ6K7aKmAM=
    But BEFORE hashing the "<content>...</content>" i need to decode my secret that is:
    hmacsig = calculateHMAC256(content, sharedSecret.decodeBase64())
     

  • The agent service is running, but the request failed for ...

    Hi!
    ZCM 10.3.3 on SLES 11. HP notebook, Windows 7 Pro SP1.
    When WiFi is also switched on I got yellow diamond in ZCC and error "The agent service is running, but the request failed for one or more known addresses.". What this does mean? WiFi off -- green again! =)
    More thanks, Alar.

    Does the address it's getting via Wireless have a path back to the ZCM server? That was my point. If your wireless is vlan'd away from the wired network, ZCM won't be able to contact it through THAT particular address and will show the yellow diamond as a result even though it communicates fine through the wired address.

  • SOA serve not accepting requests and running

    I have a manged server.
    I am starting up admin first, then SOA and then BAM.
    however when I get to SOA im supposed to get FabricProviderServlet.stateChanged SOA Platform is running and accepting requests however I just get is is started in running mode any ideas why??
    I believe this is the reason I cannot acces
    the BPM composer and BPM workspace
    Any ideas
    Thanks in advance!!

    Hi Ashwin,
    Is there any warnning or error information when you try to restart the PRODUCTION environment?
    Best Regards.
    Steven Lee Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

Maybe you are looking for