Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Navitabs
rootNational Adviseringsservice 2 (NAS2) - Leverancebeskrivelse
includeroottrue


Table of Contents

Introduktion

...

  • Hver testcase er implementeret som en metode i den relevante testklasse
  • Testcasen er navngivet, så det tydeligt fremgår, hvad formålet med testen er
  • Kommentarer i testcasen inddeler tydeligt i præcondition (Given), udførsel (When), tjek (Then) som beskrevet f.eks. Martin Fowler: Given-When-Then

 

Unittests er implementeret vha JUnit og kan eksekveres af Mavens standard testplugin SureFire.

...

Det kræves at følgende properties angives ved afvikling af integrationstesten


Property

Beskrivelse

notificationbroker.endpointEndpoint for NAS 2 NotificationBroker
pullpointfactory.endpointEndpoint for NAS 2 PullPointFactory
pullpoint.endpointEndpoint for NAS 2 PullPoint
subscriptionmanager.endpointEndpoint for NAS 2 SubscriptionManager
idlist.endpointEndpoint for NAS 2 Idlist
administration.endpointEndpoint for NAS 2 Administration

 

For nemheds skyld er der angivet følgende profiler (kan angives med -P), med variabeldefinitioner for et givent miljø

ProfilnavnMiljø
developmentDet dockerbaserede udviklingsmiljø for NAS 2

F.eks.

Code Block
mvn -Pdevelopment test

 


Testrapporter kan genereres i HTML med kommandoer:   mvn surefire-report:report; mvn site -DgenerateReports=false

...

  1. Oprettelse og/eller opdatering af ID liste.
    mvn -Pverification -Dverification.mode=idlist -Dverification.idlist.endpoint=http://localhost:8090/idlist -Dverification.input=/path/to/file/idlist.txt
    Indholdet i verification.input filen skal være som nedenstående. 
    /*
    * Id list filen den skal være formateret som nedenstående.
    *
    * navn:idliste_navn:id_type
    * id:id_no_1
    * id:id_no_2
    * navn:en_anden_liste
    * id:id_no_4
    * id:id_no_5
    */
  2. Oprettelse af pull point og subscription.
    mvn -Pverification -Dverification.mode=subscribe -Dverification.subscriptionmanager.endpoint=http://localhost:8090/subscriptionmanager -Dverification.pullpointfactory.endpoint=http://localhost:8090/pullpointfactory -Dverification.input=/path/to/input/subscription.txt -Dverification.output=/path/to/output/subscription_output.txt
    Indholdet i verification.input skal være som nedenstående. Output filen indeholder liste med pull point id'er. 
    /**
    * Input filen skal være formateret som nedenstående
    * subid:topic:id_liste_navn
    *
    * Id liste navn er optional og hvis det er udeladt oprettes der en subscription uden tilknyttet id liste.
    */
  3. Aflevering af adviser. 
    mvn -Pverification -Dverification.mode=notify -Dverification.input=/home/jonas/input.txt -Dverification.notificationbroker.endpoint=http://localhost:8090/notificationbroker
  4. Afhentning af adviseringer. 
    mvn -Pverification -Dverification.mode=getmessages -Dverification.pullpoint.endpoint=http://localhost:8090/pullpoint -Dverification.input=/path/to/input/pullpoint.txt -Dverification.output=/path/to/output/pullpoint_output.txt
  5. Indholdet i verification.input være et pull point id pr. linie. Output filen indeholder en linie pr afhentet advisering med ID og pull point id. 

...