locked
Is it possible to re-order parameter values? RRS feed

  • Question

  • We have ~110 Parameters in our test case and when we remove and re-add the parameters in the parameters values table the newest parameters are added to the left of the table. We'd like the parameter columns to be listed in the order they are listed in the test case. [This will make pasting cvs data into the iterations easier].

    From what we're seeing we have to blow away all of the values and remove all of the parameters in the test case in order to do a simple re-order...or am I missing the option to re-order the parameters columns?

    Wednesday, August 11, 2010 3:45 PM

Answers

  • Hi Allen

    Good feedback. Currently it is not possible but i agree its a nice thing to have. Only workaround for you is to reorder your CSV to match the Columns in the parameter table. We will try to add this for the next release.

    thanks
    Rituparna.


    http://blogs.msdn.com/rituparna
    Thursday, August 12, 2010 11:22 AM

All replies

  • Hi Allen

    Good feedback. Currently it is not possible but i agree its a nice thing to have. Only workaround for you is to reorder your CSV to match the Columns in the parameter table. We will try to add this for the next release.

    thanks
    Rituparna.


    http://blogs.msdn.com/rituparna
    Thursday, August 12, 2010 11:22 AM
  • Hi Rituparna.

    There is no way we are going to reorder our CSV to match the Columsn in the parameter table. We've seen that changing/adding @parameter in the test case steps changes the parameter table and reorders it in some bizarre inconsistent ways (adds as the first column, adds somewhere in the middle column, and adds it as the last column).

    Have you guys tested with HUNDREDS of parameters and what happens when you add a new parameter, or you remove a parameter and then add it back in? It mucks up the whole table order.

    This is very troubling....and is leading me to think the parameters feature just isn't ready for real world use by our team.

    Are there any other ways to add parameters in test cases without using the parameter's table?

    Thursday, August 12, 2010 12:06 PM
  • What is happening is the columns are created in the order the @Params exist in the TestSteps control. However Deleting an @Param from the middle and adding one different param in its place will result in the new param to be placed at the end...Having said this We did test with hundreds of DataParams but the parameter ordering was not a feature we had so its as per design.

    I dont think there exists any other way of adding Parameter Values without using the parameter Table..however i will doubleCheck on this.

    thanks

    Rituparna


    http://blogs.msdn.com/rituparna
    Thursday, August 12, 2010 2:30 PM
  • Have you learned if it's possible?
    Monday, November 8, 2010 4:18 PM
  • This is a problem our QA Dept is running into as well. Any status on this since the last update??
    Monday, March 7, 2011 5:48 PM
  • any updates from Microsoft?
    Wednesday, June 8, 2011 6:18 PM
  • This inadequacy drives me absolutely ape sh#t crazy.  BLARG!

    I have multiple shared steps with multiple parameters which are built into larger test cases.  If I need to edit or change any shared step parameter, that parameter is shoved to the end.  One particular test case, made of of shared steps, has 125 parameters!  BLARG!  (No philosophical comments, please, about test case size.)

    But what REALLY gets me is that if I decide to remove the shared steps and re-add so that I get the parameters back in order, there is no easy way for me to save my data and re-add.  BLARG!  If this tool actually let you enter parameter data using an Excel type application, that would help overwhelmingly!  But no, we get this stripped down data entry area that is completely unreliable.  If only I could copy and paste from an iteration.  Nope, any BLANK parameter will be stripped so that when you paste back in, only NOT blank values are pasted in consecutive columns!  BLARG!

    How is it that MS owns EXCEL and cannot use EXCEL to make their test tool usable?

    (And for those that ask, I want my data to be driven by a test case that exists in MTM (not by any other data method.))

    Please, for the love of <insert deity of your choice>, make this easier to use.  Data driving a test case should be easy.  Even QTP, with their clunky data driving features, makes this ability doable.

    BLARG.

    Thursday, September 22, 2011 5:21 PM
  • This inadequacy drives me absolutely ape sh#t crazy.  BLARG!

    I have multiple shared steps with multiple parameters which are built into larger test cases.  If I need to edit or change any shared step parameter, that parameter is shoved to the end.  One particular test case, made of of shared steps, has 125 parameters!  BLARG!  (No philosophical comments, please, about test case size.)

    But what REALLY gets me is that if I decide to remove the shared steps and re-add so that I get the parameters back in order, there is no easy way for me to save my data and re-add.  BLARG!  If this tool actually let you enter parameter data using an Excel type application, that would help overwhelmingly!  But no, we get this stripped down data entry area that is completely unreliable.  If only I could copy and paste from an iteration.  Nope, any BLANK parameter will be stripped so that when you paste back in, only NOT blank values are pasted in consecutive columns!  BLARG!

    How is it that MS owns EXCEL and cannot use EXCEL to make their test tool usable?

    (And for those that ask, I want my data to be driven by a test case that exists in MTM (not by any other data method.))

    Please, for the love of <insert deity of your choice>, make this easier to use.  Data driving a test case should be easy.  Even QTP, with their clunky data driving features, makes this ability doable.

    BLARG.

    This problem is also driving me crazy. We also have large testcases combined into testsuites to create a flow.

    BUT, the main issue is I can't get the parameters out of testmanager. I have asked this before and very helpfully received this tool: http://exporttfs2excel.codeplex.com/ This helped me to export all the testcases out of MTM, but NOT the parameters.

    How can I export the parameters of the testcases?!?

     

     

    Friday, September 23, 2011 7:16 AM
  • I've just downloaded the new MTM 11 Beta hoping this would be fixed but it isn't. The way I do it is highlight the entire row of parameters and copy (Ctrl + C) and then paste them into Excel. There are no options to copy and paste in MTM but the keyboard shortcuts work. Then if you highlight all of the steps and cut them (Ctrl + X) and then paste them straight back in (Ctrl + V) then the parameters are now ordered as per your steps/shared steps. Then you just have to reorder the parameters which you pasted into Excel into the correct order, highlight the row of parameters in MTM and paste (Ctrl + V) them back in.

    It's a real shame this isn't built in because you can drag the parameter columns around with your mouse, you just can't drop them anywhere.

    Tuesday, April 17, 2012 3:42 PM
  • This problem still exists in MTM 2013.

    I have deviced a work around for new and existing test cases that seems to work just fine for me.

    For New test case:

    I create a step 1 that lists all the paramenters in the order that I need them. e.g. @para1, @para2, ... , @para125

    Then I insert all the test steps including share test steps. 

    For Exisiting test cases:

    Cut out all the steps; create a step 1 and type the parameters in the correct order as above; then paste the steps you cut out.

    Alternatively you can copy past the steps in to a temporary test case, copy paste the parameter list from your data source - not forgetting to add the "@". Then paste back the initial steps.

    In both cases you are tricking MTM and don't forget to remove the "step 1" with all the parameters (they are present in your test steps and shared steps so they will still show in the test case - in the correct order!).



    • Edited by jmwihia Monday, July 7, 2014 7:29 PM typos
    • Proposed as answer by Paul M Edwards Wednesday, June 29, 2016 12:48 AM
    Monday, July 7, 2014 7:25 PM
  • I recently started using MTM for Test Management and ran in to the same issue.

    Based on this thread, I see that this issue has been ongoing since 2010 and still exists in 2015. 

    Is Microsoft planning to fix this issue in near future?

    Wednesday, June 17, 2015 9:53 PM
  • I was able to achieve this by writing some C#, you guys are are welcome!

    // I built a UI on top of this where the user can enter the test ID....

    private void ParamsSorter() { int id; int.TryParse(textBox1.Text, out id); var test = project.TestCases.Find(id);//find by ID List<String> listParams = GetParametersList(test.Actions).ToList(); DataTable table = test.Data.Tables[0]; for (int i = 0; i < listParams.Count(); i++) { table.Columns[listParams.ElementAt(i)].SetOrdinal(i); } test.Save(); } public IEnumerable<String> GetParametersList(TestActionCollection collection) { IEnumerable<String> listParams = new List<string>(); foreach (ITestAction action in collection) { if (action.GetType().Name != "SharedStepReference") { ITestStep step = action as ITestStep; var list1 = step.ExpectedResult.ParameterNames; var list2 = step.Title.ParameterNames; var list3 = list2.Union(list1).Distinct().ToArray(); var list4 = listParams.Union(list3).Distinct(); listParams = list4.ToList(); } else { ISharedStepReference step = action as ISharedStepReference; var test = project.SharedSteps.Find(step.SharedStepId); listParams = listParams.Union(GetParametersList(test.Actions)); } } return listParams; }


    Monday, March 7, 2016 5:12 PM
  • I would also like to know if Microsoft plans to fix this in the near future as well????  It is going on 6 years and no movement as this is still the same behavior in the 2015 products.  This is one of those little things that could make a substantial difference to the organizations using the tool in terms of being a potential time saver.  The more test steps/parameters/cases involved, the more potential to save time in being able to find and update parameter values in a logical parameter order that makes sense to the organization instead of being bound by an uncustomizeable default behavior of the product.  Come on product team, please get things in gear on this already!!!
    Wednesday, July 27, 2016 8:13 PM