mgroen2's avatar
mgroen2
Super Contributor
9 years ago
Status:
New Idea

give a warning when called-to test is about to be deleted

situation:
first keywordtest has name 1;
second keywordtest has name 2;

keywordtest 2 calls keywordtest 1 (by using Run Keyword test command);

User deletes keywordtest 1 from projectexplorer.

Would be better if warning is displayed that keywordtest 1 is being used by keywordtest 2. And deleting test 1 would result in exception if keywordtest 2 is executed.

7 Comments

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    It has been my experience that we already get an exception if a keyword test is missing.  If I delete test1 and test2 tries to call it, the exception says that test1 is not found.

  • mgroen2's avatar
    mgroen2
    Super Contributor

    Marsha_R

     

    What you mean is that the exception is displayed at test execution time.

     

    However, what I mean is that the warning message is displayed at test design time (so, before the test is executed).

     

    Hope this is more clear now what I mean.

     

    Mathijs

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    You said:

     

    "keywordtest 2 calls keywordtest 1 (by using Run Keyword test command);
    User deletes keywordtest 1 from projectexplorer.
    Would be better if warning is displayed that keywordtest 1 is being used by keywordtest 2. "

     

    I agree, we need this.

     

     

    You also said:  

     

    "And deleting test 1 would result in exception if keywordtest 2 is executed."

     

    TestComplete already does this. 

  • mgroen2's avatar
    mgroen2
    Super Contributor

     

    Marsha_R see my previous comment. The request is to give the warning in test design phase (not in test execution phase).

     

     

     

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    I agreed with the test design message.  You also said "And deleting test 1 would result in exception if keywordtest 2 is executed."  which is at test execution time.  TestComplete already does this.

  • mgroen2's avatar
    mgroen2
    Super Contributor

    An alternative or extra option, would be to give display a message in which the user can choose to delete all calls (or disable) to the deleted keyword test.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    In 12.5, there is some better logic in the "find declaration" that actually works on keyword tests.  So, before you do the deletion, make it SOP to check if it is used somewhere first.