summaryrefslogtreecommitdiffstats
path: root/test/postman/README.md
diff options
context:
space:
mode:
authorRene Robert <rene.robert@orange.com>2019-02-01 22:00:57 +0100
committerRene Robert <rene.robert@orange.com>2019-02-01 22:09:52 +0100
commit62163beebaa5fc9742eff6ca6262b9d04743a28a (patch)
tree5a39072404bafbefbace60f3b9754a4555457612 /test/postman/README.md
parent2eab9efad856edc6a111921906895d52ac836e6b (diff)
corrections and README update
Issue-ID: INT-846 Change-Id: I1537e02f31e91882c8b27b0484e72b1b1641c8a4 Signed-off-by: Rene Robert <rene.robert@orange.com>
Diffstat (limited to 'test/postman/README.md')
-rw-r--r--test/postman/README.md34
1 files changed, 32 insertions, 2 deletions
diff --git a/test/postman/README.md b/test/postman/README.md
index 86a797b8f..2d65158c7 100644
--- a/test/postman/README.md
+++ b/test/postman/README.md
@@ -1,6 +1,6 @@
# Postman Collections
-## Description
+## Using Postman
That repository contains 9 Postman collections and 2 environment files.
@@ -30,7 +30,7 @@ The order is very important because a lot of API request will need the API
response from the previous operation.
![postman](./images/collection-detail-test.png)
-It is possible to run the complete collection.
+It is possible to run the complete collection using Postman
![postman](./images/run.png)
You need, a zip file that contains Heat files for a VNF.
@@ -66,3 +66,33 @@ In particular, you need to put your own values for cloud_region_id, tenant_name
service_instance_name:integration_test_freeradius_instance_001
listener_url:http://10.4.2.65:8080/externalapi/listener/v1/listener
```
+
+## Using Newman
+
+Newman is a tool that allow to run postman collections via CLI
+
+Using a Linux server, just run those lines:
+
+```shell
+git clone https://gitlab.com/Orange-OpenSource/lfn/onap/onap-tests.git
+cd onap-tests/postman
+sudo apt-get -y install zip
+USECASE=$'ubuntu16'
+zip -j $USECASE.zip ../onap_tests/templates/heat_files/$USECASE/*
+TAB=$'\t\t\t\t\t\t\t'
+sed -i -e "s/.*src.*/$TAB\"src\": \"$USECASE.zip\"/" 03_Onboard_VSP_part2.postman_collection.json
+docker pull postman/newman:alpine
+docker run --network="host" --volume="/home/debian/rene/onap-tests/postman:/etc/newman" postman/newman:alpine run 01_Onboard_Vendor.postman_collection.json --environment integration_test_urls.postman_environment.json --globals globals.postman_globals.json --export-globals globals.postman_globals.json --reporters cli,json --reporter-cli-no-assertions --reporter-cli-no-console
+docker run --network="host" --volume="/home/debian/rene/onap-tests/postman:/etc/newman" postman/newman:alpine run 02_Onboard_VSP_part1.postman_collection.json --environment integration_test_urls.postman_environment.json --globals globals.postman_globals.json --export-globals globals.postman_globals.json
+docker run --network="host" --volume="/home/debian/rene/onap-tests/postman:/etc/newman" postman/newman:alpine run 03_Onboard_VSP_part2.postman_collection.json --environment integration_test_urls.postman_environment.json --globals globals.postman_globals.json --export-globals globals.postman_globals.json
+docker run --network="host" --volume="/home/debian/rene/onap-tests/postman:/etc/newman" postman/newman:alpine run 04_Onboard_VSP_part3.postman_collection.json --environment integration_test_urls.postman_environment.json --globals globals.postman_globals.json --export-globals globals.postman_globals.json
+docker run --network="host" --volume="/home/debian/rene/onap-tests/postman:/etc/newman" postman/newman:alpine run 05_Onboard_VF.postman_collection.json --environment integration_test_urls.postman_environment.json --globals globals.postman_globals.json --export-globals globals.postman_globals.json
+docker run --network="host" --volume="/home/debian/rene/onap-tests/postman:/etc/newman" postman/newman:alpine run 06_Onboard_Service.postman_collection.json --environment integration_test_urls.postman_environment.json --globals globals.postman_globals.json --export-globals globals.postman_globals.json
+docker run --network="host" --volume="/home/debian/rene/onap-tests/postman:/etc/newman" postman/newman:alpine run 07_Declare_owningEntity_LineOfBusiness_project_platform.postman_collection.json --environment integration_test_urls.postman_environment.json --globals globals.postman_globals.json --export-globals globals.postman_globals.json
+docker run --network="host" --volume="/home/debian/rene/onap-tests/postman:/etc/newman" postman/newman:alpine run 08_Declare_Customer_Service_Subscription_Cloud.postman_collection.json --insecure --environment integration_test_urls.postman_environment.json --globals globals.postman_globals.json --export-globals globals.postman_globals.json
+docker run --network="host" --volume="/home/debian/rene/onap-tests/postman:/etc/newman" postman/newman:alpine run 10_Service_Order.postman_collection.json --environment integration_test_urls.postman_environment.json --globals globals.postman_globals.json --export-globals globals.postman_globals.json --reporters cli,json --reporter-cli-no-assertions --reporter-cli-no-console
+```
+
+All collections are run, you can see results and you will also obtain result json files in the onap-tests/postamn/newman directory
+
+Of course you can adapt globals variables in globals.postman_globals.json or change the USECASE=$'ubuntu16' value to onboard any heat template located in onap_tests/templates/heat_files directory