Browse Source

Updated auth_user_testserver and updated scripts for Linux and Windows

Bernhard 5 years ago
parent
commit
77bb9408cd

+ 4 - 0
.idea/misc.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6" project-jdk-type="Python SDK" />
+</project>

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/pyAPITest.iml" filepath="$PROJECT_DIR$/.idea/pyAPITest.iml" />
+    </modules>
+  </component>
+</project>

+ 8 - 0
.idea/pyAPITest.iml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="PYTHON_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 8 - 3
API_Calls.py

@@ -94,7 +94,7 @@ class perf_trace:
         ps = pstats.Stats(self.__pr, stream=s).sort_stats(sortby)
         ps.print_stats()
         logger.info("Performance-Trace follows:\n" + s.getvalue())
-        #print(s.getvalue())
+
 
 def g_post(url, json=None, headers=None, data=None, files=None):
     
@@ -104,7 +104,7 @@ def g_post(url, json=None, headers=None, data=None, files=None):
         else:
             if json:
                 resp= requests.post(url, headers=headers, json=json)
-            elif data: #Picture upload
+            elif data:              # Picture upload
                 resp = requests.post(url, headers=headers, data=data, files=files)
             else:
                 print("Unknown combination in g_post-call: no headers, no json and no data")
@@ -116,6 +116,7 @@ def g_post(url, json=None, headers=None, data=None, files=None):
         
     return resp
 
+
 def g_get(url, json=None, headers=None):
     if url[0] != "#":
         if not json:
@@ -130,12 +131,14 @@ def g_get(url, json=None, headers=None):
         
     return resp   
 
+
 class i_response:
     # Class to buffer a response-object into
-    # internal formati
+    # internal formating
     # so that we can mock response-object
     status_code = None
     text = None
+
     def __init__(self, response=None):
         if response:
             self.__response = response
@@ -144,11 +147,13 @@ class i_response:
             self.__response = None
             self.text = "dummy"
         self.__json = None
+
     def json(self):
         if self.__response:
             return self.__response.json()
         else:
             return self.__json
+
     def set_json(self, l_json):
         self.__json = l_json
     

+ 29 - 0
api_calls.exe.spec

@@ -0,0 +1,29 @@
+# -*- mode: python -*-
+
+block_cipher = None
+
+
+a = Analysis(['API_Calls.py'],
+             pathex=['c:\\cloudstation_earthsquad\\CloudStation\\pwa\\Testcases\\API\\ES_API_TEST\\pyAPITest'],
+             binaries=[],
+             datas=[],
+             hiddenimports=[],
+             hookspath=[],
+             runtime_hooks=[],
+             excludes=[],
+             win_no_prefer_redirects=False,
+             win_private_assemblies=False,
+             cipher=block_cipher)
+pyz = PYZ(a.pure, a.zipped_data,
+             cipher=block_cipher)
+exe = EXE(pyz,
+          a.scripts,
+          a.binaries,
+          a.zipfiles,
+          a.datas,
+          name='api_calls.exe',
+          debug=False,
+          strip=False,
+          upx=True,
+          runtime_tmpdir=None,
+          console=True )

+ 1 - 1
dist/_mysql_recycle.cmd

@@ -1 +1 @@
-api_calls.exe --users=100 --products=1000 --server=https://app-test.earthsquad.global/api --mode=recycling --csv="auth_user_mysql.csv"
+api_calls.exe --users=1000 --products=1000 --server=https://app-test.earthsquad.global/api --mode=recycling --csv="auth_user_testserver.csv"

+ 1 - 1
dist/_mysql_short.cmd

@@ -1 +1 @@
-api_calls.exe --users=1 --products=100 --noimage=yes --server=https://app-test.earthsquad.global/api
+api_calls.exe --users=10 --products=100 --noimage=yes --server=https://app-test.earthsquad.global/api

+ 1 - 1
dist/_mysql_short_recycle.cmd

@@ -1 +1 @@
-api_calls.exe --users=200 --products=20 --server=https://app-test.earthsquad.global/api --mode=recycling --csv="auth_user_mysql.csv"
+api_calls.exe --users=100 --products=50 --server=https://app-test.earthsquad.global/api --mode=recycling --csv="auth_user_testserver.csv"

BIN
dist/api_calls.exe


File diff suppressed because it is too large
+ 0 - 132199
dist/auth_user_dev_mysql_old.csv


File diff suppressed because it is too large
+ 0 - 132949
dist/auth_user_mysql_old.csv


File diff suppressed because it is too large
+ 65369 - 116581
dist/auth_user_testserver.csv