View Issue Details

IDProjectCategoryView StatusLast Update
0005306Talerotherpublic2019-12-20 18:12
ReporterMarcello Stanisci Assigned ToMarcello Stanisci Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynormalSeveritytweakReproducibilityhave not tried
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.6Fixed in Version0.6 
Summary0005306: "Modular" tests for C components.
DescriptionEvery C component's test-suite contains a "run()" method that
defines a gigantic 'commands[]' array that then feeds to the
test interpreter.

This array accounts for various parts of the tested code,
so it would be more readable to include commands into this
array in a modular fashion, instead of just heaping test
commands in it.

Right now, we do:

commands[] = {

  /* Testing feature 1 */
  TALER_TESTING_cmd_x (..),
  TALER_TESTING_cmd_y (..),
  ...

  /* Testing feature 2 */
  TALER_TESTING_cmd_z (..),
  TALER_TESTING_cmd_y (..),
  ...
  
  /* Testing feature 3 */
  ...

};

Would be more readable to have:

commands[] = {
  
  /* Testing feature 1 */
  feature_1_tests (..),

  /* Testing feature 2 */
  feature_2_tests (..),

  /* Testing feature 3 */
  ...
};
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2018-03-27 15:26

manager   ~0012905

You could achieve this using macros, or by having a meta-command that takes an array of commands ("subroutine").

Marcello Stanisci

2018-06-20 21:20

reporter   ~0013047

402a8b42 implements the meta-command technique. Note that the various test suites do NOT use this yet.

Marcello Stanisci

2018-06-26 11:22

reporter   ~0013081

010847f splits CMDs from merchant test cases;
193d95bd splits CMDs from exchange test cases.

Issue History

Date ModifiedUsernameFieldChange
2018-03-27 11:01Marcello StanisciNew Issue
2018-03-27 15:26Christian GrothoffAssigned To => Marcello Stanisci
2018-03-27 15:26Christian GrothoffSeverityminor => tweak
2018-03-27 15:26Christian GrothoffStatusnew => acknowledged
2018-03-27 15:26Christian GrothoffProduct Version => git (master)
2018-03-27 15:26Christian GrothoffTarget Version => 0.6
2018-03-27 15:26Christian GrothoffNote Added: 0012905
2018-06-20 21:20Marcello StanisciNote Added: 0013047
2018-06-26 11:22Marcello StanisciNote Added: 0013081
2018-06-26 11:22Marcello StanisciStatusacknowledged => informing
2018-06-26 11:22Marcello StanisciResolutionopen => fixed
2018-09-09 09:57Christian GrothoffFixed in Version => 0.6
2019-12-20 18:12Christian GrothoffStatusinforming => closed