Forum Discussion

shiva_ranabhat's avatar
shiva_ranabhat
Contributor
11 years ago

Disabling Stop-on-error for Project Suite?

Hi, 



Is there any way to disable stop-on-error for project suite? 







I know we can diable stop-on-error for projects but when running an entire project suit, It is quiet trouble to re-run everytime it finds error in a project. 



Thanks,

Shiva

8 Replies

  • balathavamani's avatar
    balathavamani
    Occasional Contributor
    Just check this, Right Click Project Suit in Project Explorer panel and then click Edit --> test Item --> Disable Stop on error.

     



    Try This & Revert

  • Hi Balamurugan Thavamani,



    Nice job! I didn't even think about that option.

    That option is always disabled each time we make a new project.

    When creating new projects, it has become so routine to disable it by default that I completely forgot about it.

    I only use it in the event that I actually want something to stop on error while testing.








  • Hi Marsha, 



    Thank you for the reply. Is there any alternative to run project suit even on errors? Script?



    Regards,

    Shiva
  • Marsha_R's avatar
    Marsha_R
    Icon for Champion Level 3 rankChampion Level 3
    Looks to me like you will have to set the project options to not stop on the errors for each of your separate projects inside the suite.  

  • Hi Shiva,



    I believe Marsha is correct. You will need to change every project. While this may seem daunting there is a quick trick to changing all projects.



    There are several steps I use to accomplish this task myself.



    1) I first find out what changes in the mds file when I change the stop on error checkbox.

    If you are using subversion you can just make the change on single project and then run a diff to compare what changed in the file.

    If you are not using some for subversion I highly encourage you do as soon as possible.

    If however that is not an option for you, you can always use Kdiff3 to compare a before and after copy of the file when you make the change. Notepad++ also has a compare plugin you can install.



    2) Now that you know what exactly changed in the file after you made the change.

    I then use Notepad++ to do a find and replace on all project files. I use a regex for my find and replace. I've actually done this for the same option you are talking about. Each option has a unique GUID associated with it. You will write a regex to find that GUID and the value that you changed that is associated with that GUID.

    Regex can be tricky. Depending on how many projects you need to change it may be faster to just change them by hand than to learn regex. However, the knowledge you gain now will help you anytime in the future that you need to do a mass change to settings in all projects within all suites.



    Here is an example. I don't know if your guid will be the same as mine. But the following guid is the one related to my Stop on error option.

       <Node name="{3ae91bbd-f37d-40e6-b49d-d2f1ef68e285}">

        <Prp name="type" type="I" value="1"/>

        <Prp name="value" type="B" value="-1"/>

       </Node>



    When I turn off the stop on error option and then run a diff on the mds file for this project I can see that the second value changes from -1 to zero.

    This is what I want to happen for all of my projects mds files.



    You want to make a regex that will find this section and replace only the -1 with a 0.



    You will use Notepad++ and select the search menu then choose find in files.

    Set your search mode to regular expression.



    Set directory to the path that contains all of the projects you want to change.

    Chances are you won't get this right the first time so make sure to have a backup of everything just in case you ruin your mds files somehow.



    In the find what field you will write your regex.



    Here is an example of what my regex would look like. Keep in mind I am not a regex master. I'm sure this regex could be made a lot better.

    ((3ae91bbd-f37d-40e6-b49d-d2f1ef68e285\}">\s*<Prp name="type" type\="I" value\="1"\/>\s*<Prp name\="value" type\="B" value\=")-1)

    This is what the replace with field would look like.

    ${2}0



    I just tried this regex out in a new document that only contained the section I wanted to modify. It worked great.



     


  • Hi Marsha and Levi, 



    Thank you for the reply. Using regex seems quiet useful to change all occurances but the main problem is, even after disabling all stop-on-errors on each project, the suit still stops running on error at the end of project... & display logs.. just like it happened in the first picture. 



    Regards,

    Shiva