Menu

#602 Test stats variable for test procedures

v1.1.x
closed
v1.1.4
Change Request
2022-01-18
2021-07-27
Erik Hänel
No

Create a set of test statistic variables for test procedures, which will accumulate the number of tests (i.e. asserts) and at least the number of failures. The number of failures might be higher than the number of tests due to the fact that a test procedure also catches syntax errors. The variables could be named TESTTOTAL and TESTFAILS (and TESTSUCCESSES, if this is possible).

Analysis:

The variables should be implemented in the Assertion class and will be declared in the first procedure flagged as test. The variables will be resetted in the terminal once the code jumps into a procedure (to allow using the global variables after a procedure). Each procedure shall track the stats variables at the beginning of its execution and calculate the statistics by using this baseline after each executed line. The stats variables memory shall also be attached to the Assertion class.

Implementation:

  • Implementation: Implemented as indicated by the analysis. All statistics are gathered in a key-value list and are procedure-bound as they are part of a local cluster.
  • Revision: [r1014]
  • Implementation test: Test procedures were executed and the corresponding cluster was available.

Documentation:

  • ChangesLog updated
  • Code changes commented
  • Documentation articles:
    • corresponding documentation articles updated
    • new documentation articles created
    • not needed
  • Language files:
    • corresponding language files updated
    • not needed

Tests:

Change is used in the implementation of the automatic SW test to display the statistics of each test suite. No deviations detected.

Related

Commit: [r1014]
Tickets: #634

Discussion

  • Erik Hänel

    Erik Hänel - 2021-08-18
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2021-08-18
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,23 @@
     Create a set of test statistic variables for test procedures, which will accumulate the number of tests (i.e. `assert`s) and at least the number of failures. The number of failures might be higher than the number of tests due to the fact that a test procedure also catches syntax errors. The variables could be named `TESTTOTAL` and `TESTFAILS` (and `TESTSUCCESSES`, if this is possible).
    +
    +###Analysis:
    +(*Describe, what's the issue and which changes have to be made*)
    +
    +###Implementation:
    +* Implementation: (*Describe, what you've changed*) 
    +* Revision: [rXXX]
    +* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +
    +###Documentation:
    +* [ ] ChangesLog updated
    +* [ ] Code changes commented
    +* **Documentation articles:**
    +    * [ ] corresponding documentation articles updated
    +    * [ ] new documentation articles created
    +    * [ ] not needed
    +* **Language files:**
    +    * [ ] corresponding language files updated
    +    * [ ] not needed
    +
    +###Tests:
    +(*Describe, which tests you performed and their outcome*)
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2021-08-18
    • labels: --> internal, procedure
     
  • Erik Hänel

    Erik Hänel - 2021-09-17
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,7 +1,7 @@
     Create a set of test statistic variables for test procedures, which will accumulate the number of tests (i.e. `assert`s) and at least the number of failures. The number of failures might be higher than the number of tests due to the fact that a test procedure also catches syntax errors. The variables could be named `TESTTOTAL` and `TESTFAILS` (and `TESTSUCCESSES`, if this is possible).
    
     ###Analysis:
    -(*Describe, what's the issue and which changes have to be made*)
    +The variables should be implemented in the `Assertion` class and will be declared in the first procedure flagged as `test`. The variables will be resetted in the terminal once the code jumps into a procedure (to allow using the global variables after a procedure). Each procedure shall track the stats variables at the beginning of its execution and calculate the statistics by using this baseline after each executed line. The stats variables memory shall also be attached to the `Assertion` class.
    
     ###Implementation:
     * Implementation: (*Describe, what you've changed*) 
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2021-09-21
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,20 +4,20 @@
     The variables should be implemented in the `Assertion` class and will be declared in the first procedure flagged as `test`. The variables will be resetted in the terminal once the code jumps into a procedure (to allow using the global variables after a procedure). Each procedure shall track the stats variables at the beginning of its execution and calculate the statistics by using this baseline after each executed line. The stats variables memory shall also be attached to the `Assertion` class.
    
     ###Implementation:
    -* Implementation: (*Describe, what you've changed*) 
    -* Revision: [rXXX]
    -* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +* Implementation: Implemented as indicated by the analysis. All statistics are gathered in a key-value list and are procedure-bound as they are part of a local cluster.
    +* Revision: [r1014]
    +* Implementation test: Test procedures were executed and the corresponding cluster was available.
    
     ###Documentation:
    -* [ ] ChangesLog updated
    -* [ ] Code changes commented
    +* [x] ChangesLog updated
    +* [x] Code changes commented
     * **Documentation articles:**
    -    * [ ] corresponding documentation articles updated
    +    * [x] corresponding documentation articles updated
         * [ ] new documentation articles created
         * [ ] not needed
     * **Language files:**
         * [ ] corresponding language files updated
    -    * [ ] not needed
    +    * [x] not needed
    
     ###Tests:
     (*Describe, which tests you performed and their outcome*)
    
    • status: implementing --> testing
     

    Related

    Commit: [r1014]

  • Erik Hänel

    Erik Hänel - 2022-01-18
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -20,4 +20,4 @@
         * [x] not needed
    
     ###Tests:
    -(*Describe, which tests you performed and their outcome*)
    +Change is used in the implementation of the automatic SW test to display the statistics of each test suite. No deviations detected.
    
    • status: testing --> closed
     

Anonymous
Anonymous

Add attachments
Cancel