From 6415fb1d2592551b9f8f58e6147a56c3834daa72 Mon Sep 17 00:00:00 2001 From: sacredabhishek <3474686+sacredabhishek@users.noreply.github.com> Date: Wed, 9 Aug 2023 16:53:19 +0530 Subject: [PATCH] Update for 7-multiple-testcases-for-multiple-projectsproducts-using-fixtures --- .github/FUNDING.yml | 13 - .github/ISSUE_TEMPLATE/bug_report.md | 38 -- .github/ISSUE_TEMPLATE/feature_request.md | 20 - .idea/.gitignore | 3 - .idea/Playwright_API_Testing.iml | 8 - .idea/inspectionProfiles/Project_Default.xml | 21 - .../inspectionProfiles/profiles_settings.xml | 6 - .idea/misc.xml | 7 - .idea/modules.xml | 8 - .idea/vcs.xml | 6 - POC/POC/__pycache__/__init__.cpython-310.pyc | Bin 130 -> 0 bytes POC/POC/__pycache__/settings.cpython-310.pyc | Bin 2241 -> 0 bytes POC/POC/__pycache__/urls.cpython-310.pyc | Bin 962 -> 0 bytes POC/POC/__pycache__/wsgi.cpython-310.pyc | Bin 525 -> 0 bytes POC/__pycache__/database.cpython-310.pyc | Bin 186 -> 0 bytes .../__pycache__/__init__.cpython-310.pyc | Bin 141 -> 0 bytes .../__pycache__/admin.cpython-310.pyc | Bin 182 -> 0 bytes .../__pycache__/apps.cpython-310.pyc | Bin 435 -> 0 bytes .../__pycache__/models.cpython-310.pyc | Bin 1080 -> 0 bytes .../__pycache__/serializers.cpython-310.pyc | Bin 1671 -> 0 bytes ...ple_testcases.cpython-310-pytest-7.2.2.pyc | Bin 17737 -> 0 bytes .../__pycache__/urls.cpython-310.pyc | Bin 972 -> 0 bytes .../__pycache__/views.cpython-310.pyc | Bin 4344 -> 0 bytes POC/poc_automation/conftest.py | 7 + POC/poc_automation/data.html | 554 ++++++++++++++++++ .../__pycache__/0001_initial.cpython-310.pyc | Bin 1252 -> 0 bytes .../__pycache__/__init__.cpython-310.pyc | Bin 152 -> 0 bytes POC/poc_automation/models.py | 4 +- POC/poc_automation/report.html | 310 +--------- POC/poc_automation/serializers.py | 21 +- ..._sample_testcases.py => test_testcases.py} | 397 ++++--------- POC/poc_automation/testcases_Ivin.xlsx | Bin 10615 -> 10826 bytes POC/poc_automation/testcases_lifeeazy.xlsx | Bin 10685 -> 10822 bytes POC/poc_automation/urls.py | 16 +- POC/poc_automation/views.py | 60 +- README.md | 71 ++- 36 files changed, 815 insertions(+), 755 deletions(-) delete mode 100644 .github/FUNDING.yml delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 .idea/.gitignore delete mode 100644 .idea/Playwright_API_Testing.iml delete mode 100644 .idea/inspectionProfiles/Project_Default.xml delete mode 100644 .idea/inspectionProfiles/profiles_settings.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml delete mode 100644 POC/POC/__pycache__/__init__.cpython-310.pyc delete mode 100644 POC/POC/__pycache__/settings.cpython-310.pyc delete mode 100644 POC/POC/__pycache__/urls.cpython-310.pyc delete mode 100644 POC/POC/__pycache__/wsgi.cpython-310.pyc delete mode 100644 POC/__pycache__/database.cpython-310.pyc delete mode 100644 POC/poc_automation/__pycache__/__init__.cpython-310.pyc delete mode 100644 POC/poc_automation/__pycache__/admin.cpython-310.pyc delete mode 100644 POC/poc_automation/__pycache__/apps.cpython-310.pyc delete mode 100644 POC/poc_automation/__pycache__/models.cpython-310.pyc delete mode 100644 POC/poc_automation/__pycache__/serializers.cpython-310.pyc delete mode 100644 POC/poc_automation/__pycache__/test_sample_testcases.cpython-310-pytest-7.2.2.pyc delete mode 100644 POC/poc_automation/__pycache__/urls.cpython-310.pyc delete mode 100644 POC/poc_automation/__pycache__/views.cpython-310.pyc create mode 100644 POC/poc_automation/conftest.py create mode 100644 POC/poc_automation/data.html delete mode 100644 POC/poc_automation/migrations/__pycache__/0001_initial.cpython-310.pyc delete mode 100644 POC/poc_automation/migrations/__pycache__/__init__.cpython-310.pyc rename POC/poc_automation/{test_sample_testcases.py => test_testcases.py} (81%) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index fa79395..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,13 +0,0 @@ -# These are supported funding model platforms - -github: [vivifyhealthcare] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: # Replace with a single Patreon username -open_collective: vivifyhealthcare # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index dd84ea7..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index bbcbbe7..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 26d3352..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git a/.idea/Playwright_API_Testing.iml b/.idea/Playwright_API_Testing.iml deleted file mode 100644 index d27d2cf..0000000 --- a/.idea/Playwright_API_Testing.iml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 8b03da6..0000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 105ce2d..0000000 --- a/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 6b12f5d..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 3e4973f..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/POC/POC/__pycache__/__init__.cpython-310.pyc b/POC/POC/__pycache__/__init__.cpython-310.pyc deleted file mode 100644 index f4b123567779e95d052be3cd5b2863644fecd35b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 130 zcmd1j<>g`kg5N(*q=4whAOaaM0yz#qT+9L_QW%06G#UL?G8BP?5yUT5H>;R}{AAt4 v(vtk##FEV9#FzkoXE2VB&&#|Fav6 diff --git a/POC/POC/__pycache__/settings.cpython-310.pyc b/POC/POC/__pycache__/settings.cpython-310.pyc deleted file mode 100644 index f55d8c62747cb83abfa106e6e1e1e2d46284ff5c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2241 zcmb7FZExFD6t+{R@v@}L+U^a6WHF&FlsZfsuud@M#!eS4iKE(C!J06R?@e-Bzhu7G z>*}xk4L$(hkoY0|27l!fe*hss8plq$Md>6;5?|Z*oaZ^`p0|Y6YMF!2-+%s!zO8cH zZ`sS@XBA!^!9{<81#uRKcvSFszhD)34j1sscl-~+kKAGLuxPEK6{~~?yGRWh)PxkfdmOCla+ts36Cy*FN}GsiYnF`@K(J`e$A@!99qLQw046dymc8} zLN(C5gf8dndcJNDek@q)Xw%w2SFBC2c?GVk=&E%MU9+yE>jqc9;oRmquB;w9!8nvC zW{d=5DviQO>g!Eu8ij}0WpcT^hXWir3?pfHBHco{{b zSU4pvZJavWn9;KdmPWDXNgkn03P*1a;{*r{VG>C%952T7|JaJ~Xu;6$kY29Nr$XOh zlVo=u1rku~#u470M3b9e#2!PpcSeqX9|hqs`etXiwH1bA`^9r~_vR-bC-*2mjP7i? zkB%lgBeO0hn==~O4FeXDp_~Ub*;w98Ow;weG+r_r`o{%_!id&|-}0yve`g|xJ*G@ocaH5JtMzLAPbzi;PHCB1L9 z^`4PzX2Ck9V!YFxoUZySyh#&hM9E{oI4gSmX;%CL)pZoZR;L&*rda;iq z;+|zF;$SB_)tCMB5UQ1p%Dy*Vu!%6^EjN9A2IhNcKx1be7gzmb+~8-}!Pr==;3 zLXQli0*uB~wC!wsWcx5LLhl7mSEn!;0%nQ3ilJpWOUs7V+}BL|iS~6`RJGl~URqT; z9sNL4?Z>)d8tGcQXPB@B8<1!tEqB|h+R+Y_eJ!o*>$+(V_B&0z*Gey#TDRX(OwCAZ z2gY7I)9&r82zhjd4rEcxoV%bZrjmJKq}P>!`Pl9&hH;?ptM*f+(*~gql~wI1 zy}g05r`b(i)qua<)oe@eX{k5>|J!%&_tMqu$+X}gCKzgF&ZO(A)=~x?(*|bUZnd?J z`ZE{34|enAuMb)ep20}nhGNS{s_Q(1g3YhfKQeiGl8T>0z+(?Tgnwm@s;~%LrBYiF uO2Udz5R2kPpI(F%yej)lBDX+?L3Wd z;xqKtE8jpA#FI=120_?B4$0yCeBYN7aeC?_SigUMqmOzBeK(im)rZS7*vc4+QbZl< zmJWAQ*D>c_+2da7@qXHO5c8vpyZ{oSnOJ(-9rMN8yN+E<$hL%<#u| zukcJ%%VO0?q6<;^{)aWgSB)%dqBWD1y253lG?t>#Oqm3QwZNYW_E|-EE+pncGF((k zA-OGq>yi=0uwpFnF|4)LwMyccid;o>L#mairP#1sN4elJtKx^zd8|cUbi3t#XsocEoC5Z#1K+} z?0OOe(~j3#a5lvi;p|CZ&OzwUN}|-+0*KM0s{cbF^qNTnB(g#s;Jk!d7X1y;nD~gO z%oLe~{~)@k^0J{twE_`rKSM2t$2{nBVTHi}1)j&mvPp=Sos`L5uKjaFM(_j3E_P}~ zxiQ*BDONEEc<2-uhpiigq5lKM7KKjRCzKae=(e6wyd8GY+ky4RTdx**yuAlDBaIgO zfwEOzhqu~cmca~VS$eyJ4Q#b6780fzwI@ehBzz(yJ>&LNp;_x0hV9AGtA9n({5flW u-Jd6y(DdxkG$)tvJ?u7#QGMNx9&L}y@ diff --git a/POC/POC/__pycache__/wsgi.cpython-310.pyc b/POC/POC/__pycache__/wsgi.cpython-310.pyc deleted file mode 100644 index 7e33fa67a029071309c44513b5f73f1896b89802..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 525 zcmYjO&2AGh5cWE0Q?@_ifH<3DB)SU{r>d%2(KZT#1Sv(8qDmXHo@^X>J*%~o(q4H0 zUIC8033qP3a^ejTT$oK%DI?8T@I&i|zK&&52W8_BzLOLNuiE3fs(7+OmSjt+jN>-Mj#AG6?%II8r zjdn62yh~yzu?C?nk(H~0Kuh4-iK#a5TsVMu=6&Uk(o|vY5;d2$zz0n^mMPfuRq`^O z;jPD1L1pl+1nbjVSLihUO<%zV-6%XMz-P@}wjm=tJ%4jH=nb>c#nn}R&>Lm%hUXvN zUfl1|XnNJ0nfQrBohOpOYra$$Vf-C+C9 z>Slqf@b}r}(M^T3L&Jlf+2Jm&uac!;41 diff --git a/POC/__pycache__/database.cpython-310.pyc b/POC/__pycache__/database.cpython-310.pyc deleted file mode 100644 index f1b2d14c808a6a87cd1eb64a04d14bb6a6a03766..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 186 zcmd1j<>g`kg5N(*q{IN}#~=_ zH>((+O5McLlKkAnlFa19m;it0n3Tkl#H7UHRK0@ATO2mI`6;D2sdkJY7l0hf#0Y{c I|2X~w0RGV}>Hq)$ diff --git a/POC/poc_automation/__pycache__/__init__.cpython-310.pyc b/POC/poc_automation/__pycache__/__init__.cpython-310.pyc deleted file mode 100644 index 995cd18da608ef2f89f70bce7c621434645e8568..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 141 zcmd1j<>g`kg5N(*q=4whAOaaM0yz#qT+9L_QW%06G#UL?G8BP?5yUS8H>;R}{AAt4 z(vtk##FEV9#FzkoXOK`lOejAuCO$qhFS8^*Uaz3?7Kcr4eoARhsvXFrVkRKL!Tg`kg5N(*q&NZT#~=2$^pz<_xa9dFz5o=_vahF()rHGuDO(q$mAnwxmstW2R- znJG6yPsez#%hUvT7Ze7Qybi9il)I)`lA}GSOsw=DY36sVr&OtnL@C=5>5h9SSPJE*(Gu0c*A;gxzH*5f~qCzlk3nA>VOP9KewynCVjp zf(ROu2@NSFFNko2`;iD&(y?>nhAuFkC;?MiGoC2FChf`{oFr{(%M&GJoDOhV94;)5 zV6HwxkR+sngpQ!0E4^_EANfSXasgKg*e~E}0oMw6uYiLBt{3pW^u9E{lJHHP^ zf`Wjut(_;+ndxHry}MhecS&t+!mn8@lc5>yD54uh2Y)FN4&3K18r%CiU1@mO%m{XV z6(tv1op8f@OV9d@C43?ovo*%x=gnfo0b}oHJYHvf(PxJDW4R=HA70DC&(7Ji%c&YX z;WMKq+(ZL@dGYEPDYl_ha+&+lna-_;RW#xF3jOwpPc@dlY-#Kcy@w%yV1pAS)1ES? z*HLP;gH-i+#PwMuV`1Hyj=^SWMoQSqNOB={YAaJdj};eTBQ<;&B|~-vbfl87ahhC3 zS|t;im>wt%58lYs40tNp+x3NAj49oH!=53|R6F!vMR#YEzX;$o3evTSgG|Iub zdH}&E9u0OrpSGNA-;Rx&#?%O)4eD|9PD;L*=bfNSKp#!??hqBFs5Kxh_kQyi(_-|q diff --git a/POC/poc_automation/__pycache__/serializers.cpython-310.pyc b/POC/poc_automation/__pycache__/serializers.cpython-310.pyc deleted file mode 100644 index 41effa26cdfd6382be9d0ddd649d3a9428e98715..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1671 zcma)6y>8nu5GM6+`7cqL1pVDTG)uRlC;}8{(ZOnfY=QwoHJQSx9J!Q?B3{#%$wTx3 z`U+e-6q&tsY40e>RxKxu03FDWygPm$kC%44K7sGguOIxoNytx})ISR*$M9zhFr09j zkSUEQCEVac^i;+ ziL?Oe@Gc{wYG*=D;$*TAGP|LO8OncuF`MVZl#4`llgXJ7@#0cX z$LLl6fTQNKd;|kQBFaf*Ku*dH$Z1>|k;zTSXQ|y`5#n@}uMrH>AH%r(F!p60C&h}yi%>Q!0!Qa; zA`+fm6S)JZHosrIeL0$?nRis+7;3!L~|y5XuDgp_V{>6VwOk zwE8`~#(UmJ8(9zH^L}4 z{dg|Md3L)r2jGWi$SQdQLn78-Q;8#SBNSgyRqnx^c&Z;tnXF} fBQfSS#g+G}=xVRAW;1+w9kN3MGq3_Ta1QLhHg7Yu diff --git a/POC/poc_automation/__pycache__/test_sample_testcases.cpython-310-pytest-7.2.2.pyc b/POC/poc_automation/__pycache__/test_sample_testcases.cpython-310-pytest-7.2.2.pyc deleted file mode 100644 index cad22996060978357169cbcbf9d932d52a62b502..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17737 zcmeHP>w6s6S)Z95?M-`;RU+uh*C=2}u5QYbVDNKhaurCeI*CwTZ)_!s8k6MVsZ-~mi2Y@y-zo*7BAvZR${ zSv5~8J^G!Qcg{I;Zu7ps^PY2L#p6*4KY#yEf5+bap(Ony-S~eZxH*Bp(w7xUViJ?{ zQbrb`QV1xLEEUvDlk7eTW`g2LC=(K4I1?6OBojfX3*mZed6#z=#@%Cj zXu5?(^eqf`EZQNxFR^CtE++2c-d#f6B|i+!$eC>yBr_tTPIv>QZz0+1lDyzwd&p`5wPqL47LbA^%+0UMZq|+xkzz#yP-zVu}-H<%%lk~7&NDi>4=F8K^ z4ncCzCppZHK+@%t9A*8Gbo(U7*mIEd_$0^Kry%L|NuFmfK+?zLVX5=QyEIbIbt+El zz|fgj^=lJ)$v$bBwtmBQqCN+>ZFWa566M0EDb*|YK$4&ED%N(~(<_+DXXYvgv z#Pl(3B5ynDxq-8Tnc&Hn&kUX$DMt$wk&Pbj?smcxC7qjEL9fZjop4brm9ATy)#MY7 zdf6)3<eSt*;d@_9XH8{C>U7Rgx zg<@XM(sfQN>7}mXloK1*?cS_cydB8!UJS5RR^_l9lM@IzNtbOgp1@Pom?shP7Qo#g zT~R5Qu5BN0rwCgJwh}x>u#KPtK$X1eRq~3cq6^#cOq8~7uC#k8$xedZ^eluLmC%|P znoXsgRn(nmaegd2L9W{q+|0>{I`;$BEK%=Men#{#Ahekn0mfs_u{KEN=2)r&no;G6e^SSQp`uDe)l&D zUY*T*BmN-Og=~{@Gob{PAUcuv;&$1J^G-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WQ58vqj{FW1FRLT@xA3&{!S?35d#+kB zr=lqpog>oeI8(`ImX}zp;h&*OiP5&TZaTJ*el3%*T7;H!4wBz)bEjhbPpBS$O0Z}X z>q3`cUW2B&Kwa|Z6!9+so6sc*uS+gi{3=e-HRz9Drjm*NX!G~ST;jEK2LB7nYg1>$ z%XfpjrOcaNq8oa@KHm@DMKL=M;Q+OF_DXDrb~>`|!K*I!#1hU^b#b_h4I8Je=0$WO zOvv1g)7OwwCRCgf|7O4mduOU~n9I$|XT9{&^?pAN2 zcuvrjI|`(2lffH^HOa$3O> zzDZ8=R6)Zy=@~JyIW?>AV-TOkcF3IY^974dr6Dl0;|KI{H&J^OzH4>gwn diff --git a/POC/poc_automation/__pycache__/urls.cpython-310.pyc b/POC/poc_automation/__pycache__/urls.cpython-310.pyc deleted file mode 100644 index 88ac1ec31fc784db34b8455ef6fb3fb9d4a80dd1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 972 zcmZvb%Wl&^6o$u%9p97ClmZcpZi7h8I*KABZemj^m2O6nqETijE;F{}OQC)T-T{_8 z3a{WT8!EA8!HPNKNn{~x`Pcc*IsWI2I$%{{0#xF9S654o>xMU^aye*#P z=@r|S2@$OEp{NsW=S4{jr&lDoOi!wu7r8tMD7QccAU22t;)1}5$$gLjBm{wT(%7Wf zfLr5B7x}N0EKiDWC_jP@kUx)KF4kGPos+6e1u5e#S)aXm2C2<1l_qPL;Uv3hoTW%< Y#n}q}#Nwe82L;9xV{DF%e{bjaUt5SKz5oCK diff --git a/POC/poc_automation/__pycache__/views.cpython-310.pyc b/POC/poc_automation/__pycache__/views.cpython-310.pyc deleted file mode 100644 index 86a6a4b530e7c2f0387cb62bd4227fe34c6bc333..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4344 zcmbVPOLN=S6~+ZX5Tr{J0=r-E3K-kG5IFs!SM0l<+b?;g ze%UMc*Ss~o&Iv00s#n$HVo>wevEB{pN5*Y~mw5SWgO^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%HUMGg8entQ?Y&GlCegy{F6#PA^%PkbHM>N2QnF4g zZU7ufa>wyT(gfxjCV7FDka3!>q+U{9B0zOamI%xPA*m5piS{D`OIoLFr49Bg48}V% zK61jY%6R&kAI^A(I8%F(RySd*)qM@KD66{Jrsn#bRz$vz_3}5g$%(5owv#@?N%{== z7A?_ik~iuEvEYijfN2SqltM-AA#M3Rz$A1i=!o30nfRYz!ly}H_6a*z^t^u4y1cUbOUe+lNVwj{nf+Q$;@#p6(Zv9CWKB-M5A z;?fjQ{l%IVwZ&O!V@tf2RXLTk&AR{6Er&J`vjb@#pKj6O7xgvJ(0U`pW zKNfVitNSzEjOeN)DKkonSM9u#%qU5;oMPuDkKOCZ_sn~!|AzW0Km~nMgy2WggkPmzsjoMR+ok^jY#NLT diff --git a/POC/poc_automation/conftest.py b/POC/poc_automation/conftest.py new file mode 100644 index 0000000..e315012 --- /dev/null +++ b/POC/poc_automation/conftest.py @@ -0,0 +1,7 @@ +# conftest.py + +import pytest + +def pytest_configure(config): + config.addinivalue_line("markers", "IvinPro_test: Marker for test cases related to Lifeeazy product.") + config.addinivalue_line("markers", "Lifeeazy_test: Marker for test cases related to Ivin_Pro product.") \ No newline at end of file diff --git a/POC/poc_automation/data.html b/POC/poc_automation/data.html new file mode 100644 index 0000000..d2f7b43 --- /dev/null +++ b/POC/poc_automation/data.html @@ -0,0 +1,554 @@ + Test Report
Test Report

Summary

12
6 failed 6 passed

Tests

test_testcases.py 66 0:00:09.739287

FAILED test_lifeeazypost 0:00:02.210582

AssertionError: assert False
+ +  where False = <APIResponse url='http://staging-api.vivifyhealthcare.com/User/Allergies/' status=400 status_text='Bad Request'>.ok

Setup

Captured stdout setup
6 entries
+

Call

api_lifeeazy = <playwright._impl._fetch.APIRequestContext object at 0x0000016EC1744DF0>
+
+    @pytest.mark.Lifeeazy_test
+    def test_lifeeazypost(api_lifeeazy: APIRequestContext) -> None:
+        ab = list1
+        for values in ab:
+            url = values['url']
+            method = values['method']
+            headers = values['headers']
+            payload = values['payload']
+            staging_version = values['staging_version']
+            EnvironmentName = values['EnvironmentName']
+            Testcase_Version = values['Testcase_Version']
+            Project_Name = values['Project_Name']
+            Test = values['Test']
+            headers23 = {'Content-Type': 'application/json', 'Authorization': f"Bearer {headers}"}
+            if method == 'POST' and Test == 'Allergies Post':
+                cleaned_string = url.replace("\u200B", "")
+                post_todo = api_lifeeazy.post(url=str(cleaned_string), headers=headers23, data=payload)
+                try:
+                    test1 = post_todo.json()
+                    if test1['Status'] == 200:
+                        data = {"Test Case-Id": "1",
+                                "Pre condition": "Post",
+                                "Flow ": "Post Register",
+                                "App Name": "Lifeeazy",
+                                "Expected Output": "200",
+                                "Actual Output": str(test1),
+                                "Endpoint Name": str(url),
+                                "Section Name": "User",
+                                "API Type": "User",
+                                "Status Code": test1['Status'],
+                                "Status": "Success",
+                                "TestCase Status API": "Pass TestCase",
+                                "Test Run Date": DateTime,
+                                "Test Releated To Version": str(staging_version),
+                                'Environment Name': EnvironmentName,
+                                "TestCase Version": Testcase_Version,
+                                "Project Name": Project_Name}
+                        collection2.insert_one(data)
+                        # if values in list1:
+                        #     list1.remove(values)
+                        #     print(len(list1), "mani")
+                        # for j in list1:
+                        #     print(j['url'])
+                    else:
+                        data = {"Test Case-Id": "1",
+                                "Pre condition": "Enter the valid details",
+                                "Flow ": "Post Register",
+                                "App Name": "Lifeeazy",
+                                "Expected Output": "400",
+                                "Actual Output": str(test1),
+                                "Endpoint Name": str(url),
+                                "Section Name": "User",
+                                "API Type": "User",
+                                "Status Code": test1['Status'],
+                                "Status": "Fail",
+                                " TestCase Status API": "Fail TestCase",
+                                "Test Run Date": DateTime,
+                                "Test Releated To Version": str(staging_version),
+                                'Environment Name': EnvironmentName,
+                                'TestCase Version': Testcase_Version,
+                                'Project Name': Project_Name}
+                        collection2.insert_one(data)
+                        # if values in list1:
+                        #     list1.remove(values)
+                        #     print(len(list1),"mani")
+                        # for j in list1:
+                        #     print(j['url'])
+    
+                except Exception as e:
+                    data = {"Test Case-Id": "1",
+                            "Pre condition": "Give the correct url&data",
+                            "Flow ": "Post Register",
+                            "App Name": "Lifeeazy",
+                            "Expected Output": '404',
+                            "Actual Output": str(post_todo),
+                            "Endpoint Name": str(url),
+                            "Section Name": "User",
+                            "API Type": "User",
+                            "Status Code": 404,
+                            "Status": "Not Found",
+                            " TestCase Status API": "Fail TestCase",
+                            "Test Run Date": DateTime,
+                            "Test Releated To Version": str(staging_version),
+                            'Environment Name': EnvironmentName,
+                            'TestCase Version': Testcase_Version,
+                            'Project Name': Project_Name}
+                    collection2.insert_one(data)
+                    # if values in list1:
+                    #     list1.remove(values)
+                    #     print(len(list1), "mani")
+                    # for j in list1:
+                    #     print(j['url'])
+>               assert post_todo.ok
+E               AssertionError: assert False
+E                +  where False = <APIResponse url='http://staging-api.vivifyhealthcare.com/User/Allergies/' status=400 status_text='Bad Request'>.ok
+
+test_testcases.py:156: AssertionError

Teardown

PASSED test_lifeeazyget 0:00:00.300156

Setup

Call

Teardown

FAILED test_lifeeazyupdate 0:00:00.634519

AssertionError: assert False
+ +  where False = <APIResponse url='http://staging-api.vivifyhealthcare.com/User/UserAddressUpdate/133/' status=500 status_text='Internal Server Error'>.ok

Setup

Call

api_lifeeazy = <playwright._impl._fetch.APIRequestContext object at 0x0000016EC1744DF0>
+
+    @pytest.mark.Lifeeazy_test
+    def test_lifeeazyupdate(api_lifeeazy: APIRequestContext) -> None:
+        ab = list1
+        for values in ab:
+            url = values['url']
+            method = values['method']
+            headers = values['headers']
+            payload = values['payload']
+            staging_version = values['staging_version']
+            EnvironmentName = values['EnvironmentName']
+            Testcase_Version = values['Testcase_Version']
+            Project_Name = values['Project_Name']
+            Test = values['Test']
+            headers23 = {'Content-Type': 'application/json', 'Authorization': f"Bearer {headers}"}
+            if method == 'PUT' and Test == 'Address Put':
+                cleaned_string = url.replace("\u200B", "")
+                put_todo = api_lifeeazy.put(url=str(cleaned_string), headers=headers23, data=payload)
+                try:
+                    test1 = put_todo.json()
+                    if test1['Status'] == 200:
+                        data = {"Test Case-Id": "3",
+                                "Pre condition": "Updating Vitals by using VitalsId",
+                                "Flow ": "Update Vitals",
+                                "App Name": "Lifeeazy",
+                                "Expected Output": "200",
+                                "Actual Output": str(test1),
+                                "Endpoint Name": str(url),
+                                "Section Name": "User",
+                                "API Type": "User",
+                                "Status Code": test1['Status'],
+                                "Status": "Success",
+                                " TestCase Status API": "Pass TestCase",
+                                "Test Run Date": DateTime,
+                                "Test Releated To Version": str(staging_version),
+                                'Environment Name': EnvironmentName,
+                                'TestCase Version': Testcase_Version,
+                                'Project Name': Project_Name}
+                        collection2.insert_one(data)
+                        # if values in list1:
+                        #     list1.remove(values)
+                        #     print(len(list1), "mani")
+                        # for j in list1:
+                        #     print(j['url'])
+                    else:
+                        data = {"Test Case-Id": "3",
+                                "Pre condition": "Enter the valid details",
+                                "Flow ": "Update Vitals",
+                                "App Name": "Lifeeazy",
+                                "Expected Output": "400",
+                                "Actual Output": str(test1),
+                                "Endpoint Name": str(url),
+                                "Section Name": "User",
+                                "API Type": "User",
+                                "Status Code": test1['Status'],
+                                "Status": "Fail",
+                                " TestCase Status API": "Fail TestCase",
+                                "Test Run Date": DateTime,
+                                "Test Releated To Version": str(staging_version),
+                                'Environment Name': EnvironmentName,
+                                'TestCase Version': Testcase_Version,
+                                'Project Name': Project_Name}
+                        collection2.insert_one(data)
+                        # if values in list1:
+                        #     list1.remove(values)
+                        #     print(len(list1), "mani")
+                        # for j in list1:
+                        #     print(j['url'])
+                except Exception as e:
+                    data = {"Test Case-Id": "3",
+                            "Pre condition": "Give the correct url&data",
+                            "Flow ": "Update Vitals",
+                            "App Name": "Lifeeazy",
+                            "Expected Output": '404',
+                            "Actual Output": str(put_todo),
+                            "Endpoint Name": str(url),
+                            "Section Name": "User",
+                            "API Type": "User",
+                            "Status Code": 404,
+                            "Status": "Not Found",
+                            " TestCase Status API": "Fail TestCase",
+                            "Test Run Date": DateTime,
+                            "Test Releated To Version": str(staging_version),
+                            'Environment Name': EnvironmentName,
+                            'TestCase Version': Testcase_Version,
+                            'Project Name': Project_Name}
+                    collection2.insert_one(data)
+                    # if values in list1:
+                    #     list1.remove(values)
+                    #     print(len(list1), "mani")
+                    # for j in list1:
+                    #     print(j['url'])
+>               assert put_todo.ok
+E               AssertionError: assert False
+E                +  where False = <APIResponse url='http://staging-api.vivifyhealthcare.com/User/UserAddressUpdate/133/' status=500 status_text='Internal Server Error'>.ok
+
+test_testcases.py:347: AssertionError

Teardown

FAILED test_lifeeazydelete 0:00:00.348559

AssertionError: assert False
+ +  where False = <APIResponse url='http://staging-api.vivifyhealthcare.com/User/RemoveUserApi/291/' status=400 status_text='Bad Request'>.ok

Setup

Call

api_lifeeazy = <playwright._impl._fetch.APIRequestContext object at 0x0000016EC1744DF0>
+
+    @pytest.mark.Lifeeazy_test
+    def test_lifeeazydelete(api_lifeeazy: APIRequestContext) -> None:
+        ab = list1
+        for values in ab:
+            url = values['url']
+            method = values['method']
+            headers = values['headers']
+            payload = values['payload']
+            staging_version = values['staging_version']
+            EnvironmentName = values['EnvironmentName']
+            Testcase_Version = values['Testcase_Version']
+            Project_Name = values['Project_Name']
+            Test = values['Test']
+            headers23 = {'Content-Type': 'application/json', 'Authorization': f"Bearer {headers}"}
+            if method == 'DELETE' and Test == 'User Delete':
+                cleaned_string = url.replace("\u200B", "")
+                delete_todo = api_lifeeazy.delete(url=str(cleaned_string), headers=headers23, data=payload)
+                try:
+                    test1 = delete_todo.json()
+                    if test1['Status'] == 200:
+                        data = {"Test Case-Id": "4",
+                                "Pre condition": "We can delete User by using UserId(id)",
+                                "Flow ": "Delete User details",
+                                "App Name": "Lifeeazy",
+                                "Expected Output": "200",
+                                "Actual Output": str(test1),
+                                "Endpoint Name": str(url),
+                                "Section Name": "User",
+                                "API Type": "User",
+                                "Status Code": test1['Status'],
+                                "Status": "Success",
+                                " TestCase Status API": "Pass TestCase",
+                                "Test Run Date": DateTime,
+                                "Test Releated To Version": str(staging_version),
+                                'Environment Name': EnvironmentName,
+                                'TestCase Version': Testcase_Version,
+                                'Project Name': Project_Name}
+                        collection2.insert_one(data)
+                        # if values in list1:
+                        #     list1.remove(values)
+                        #     print(len(list1), "mani")
+                        # for j in list1:
+                        #     print(j['url'])
+                    else:
+                        data = {"Test Case-Id": "4",
+                                "Pre condition": "Enter the valid id",
+                                "Flow ": "Delete User details",
+                                "App Name": "Lifeeazy",
+                                "Expected Output": "400",
+                                "Actual Output": str(test1),
+                                "Endpoint Name": str(url),
+                                "Section Name": "User",
+                                "API Type": "User",
+                                "Status Code": test1['Status'],
+                                "Status": "Fail",
+                                " TestCase Status API": "Fail TestCase",
+                                "Test Run Date": DateTime,
+                                "Test Releated To Version": str(staging_version),
+                                'Environment Name': EnvironmentName,
+                                'TestCase Version': Testcase_Version,
+                                'Project Name': Project_Name}
+                        collection2.insert_one(data)
+                        # if values in list1:
+                        #     list1.remove(values)
+                        #     print(len(list1), "mani")
+                        # for j in list1:
+                        #     print(j['url'])
+                except Exception as e:
+                    data = {"Test Case-Id": "4",
+                            "Pre condition": "Give the correct url&data",
+                            "Flow ": "Delete User details",
+                            "App Name": "Lifeeazy",
+                            "Expected Output": '404',
+                            "Actual Output": str(delete_todo),
+                            "Endpoint Name": str(url),
+                            "Section Name": "User",
+                            "API Type": "User",
+                            "Status Code": 404,
+                            "Status": "Not Found",
+                            " TestCase Status API": "Fail TestCase",
+                            "Test Run Date": DateTime,
+                            "Test Releated To Version": str(staging_version),
+                            'Environment Name': EnvironmentName,
+                            'TestCase Version': Testcase_Version,
+                            'Project Name': Project_Name}
+                    collection2.insert_one(data)
+                    # if values in list1:
+                    #     list1.remove(values)
+                    #     print(len(list1), "mani")
+                    # for j in list1:
+                    #     print(j['url'])
+>               assert delete_todo.ok
+E               AssertionError: assert False
+E                +  where False = <APIResponse url='http://staging-api.vivifyhealthcare.com/User/RemoveUserApi/291/' status=400 status_text='Bad Request'>.ok
+
+test_testcases.py:441: AssertionError

Teardown

PASSED test_lifeeazyanthrobyfamid 0:00:00.474084

Setup

Call

Teardown

PASSED test_lifeeazyanthrobyuserid 0:00:00.529161

Setup

Call

Teardown

FAILED test_ivinpost 0:00:00.155112

AssertionError: assert False
+ +  where False = <APIResponse url='http://172.105.37.117:8000/candidate_profile/SocialmediaView/' status=400 status_text='Bad Request'>.ok

Setup

Captured stdout setup
6 entries
+

Call

api_ivin = <playwright._impl._fetch.APIRequestContext object at 0x0000016EC2A59450>
+
+    @pytest.mark.IvinPro_test
+    def test_ivinpost(api_ivin: APIRequestContext) -> None:
+        ab = list2
+        print(ab)
+        for values in ab:
+            url = values['url']
+            method = values['method']
+            headers = values['headers']
+            payload = values['payload']
+            staging_version = values['staging_version']
+            EnvironmentName = values['EnvironmentName']
+            Testcase_Version = values['Testcase_Version']
+            Project_Name = values['Project_Name']
+            Test = values['Test']
+            headers23 = {'Content-Type': 'application/json', 'Authorization': f"Bearer {headers}"}
+            if method == 'POST' and Test == 'Socialmedia Post':
+                cleaned_string = url.replace("\u200B", "")
+                post_todo = api_ivin.post(url=str(cleaned_string), headers=headers23, data=payload)
+                try:
+                    test1 = post_todo.json()
+                    if test1['Status'] == 200:
+                        data = {"Test Case-Id": "1",
+                                "Pre condition": "Add the candidate profile for social media view",
+                                "Flow ": "SociaMedia Post",
+                                "App Name": "Ivin_Pro",
+                                "Expected Output": "200",
+                                "Actual Output": str(test1),
+                                "Endpoint Name": str(url),
+                                "Section Name": "Candidate_Profile",
+                                "API Type": "User",
+                                "Status Code": test1['Status'],
+                                "Status": "Success",
+                                " TestCase Status API": "Pass TestCase",
+                                "Test Run Date": DateTime,
+                                "Test Releated To Version": str(staging_version),
+                                'Environment Name': EnvironmentName,
+                                'TestCase Version': Testcase_Version,
+                                'Project Name': Project_Name}
+                        collection1.insert_one(data)
+                    else:
+                        data = {"Test Case-Id": "1",
+                                "Pre condition": "Add the candidate profile for social media view",
+                                "Flow ": "SociaMedia Post",
+                                "App Name": "Ivin_Pro",
+                                "Expected Output": "400",
+                                "Actual Output": str(test1),
+                                "Endpoint Name": str(url),
+                                "Section Name": "Candidate_Profile",
+                                "API Type": "User",
+                                "Status Code": test1['Status'],
+                                "Status": "Fail",
+                                " TestCase Status API": "Fail TestCase",
+                                "Test Run Date": DateTime,
+                                "Test Releated To Version": str(staging_version),
+                                'Environment Name': EnvironmentName,
+                                'TestCase Version': Testcase_Version,
+                                'Project Name': Project_Name}
+                        collection1.insert_one(data)
+                except Exception as e:
+                    data = {"Test Case-Id": "1",
+                            "Pre condition": "Give the correct url&data",
+                            "Flow ": "SociaMedia Post",
+                            "App Name": "Ivin_Pro",
+                            "Expected Output": '404',
+                            "Actual Output": str(post_todo),
+                            "Endpoint Name": str(url),
+                            "Section Name": "Candidate_Profile",
+                            "API Type": "User",
+                            "Status Code": 404,
+                            "Status": "Not Found",
+                            " TestCase Status API": "Fail TestCase",
+                            "Test Run Date": DateTime,
+                            "Test Releated To Version": str(staging_version),
+                            'Environment Name': EnvironmentName,
+                            'TestCase Version': Testcase_Version,
+                            'Project Name': Project_Name}
+                    collection1.insert_one(data)
+>               assert post_todo.ok
+E               AssertionError: assert False
+E                +  where False = <APIResponse url='http://172.105.37.117:8000/candidate_profile/SocialmediaView/' status=400 status_text='Bad Request'>.ok
+
+test_testcases.py:708: AssertionError
Captured stdout call
[{'_id': ObjectId('64d3468776792d708d8c32e3'), 'url': '/UserIvin-API/GetAllworkers/', 'method': 'GET', 'headers': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjk4ODM1OTE3LCJpYXQiOjE2OTEwNTk5MTcsImp0aSI6IjRkOTY5OGRiZjIxMjRlZThiZjMwOTQ5ZTFmMTM0ZDM0IiwidXNlcl9pZCI6M30.OT9N4Md_koAiGmj_oZny5b1FtniYBBJLGKB5AMWdWMo', 'payload': 'nan', 'staging_version': 'v3.2.0-Staging', 'EnvironmentName': 'http://172.105.37.117:8000/', 'Testcase_Version': '1.0.0.6', 'Project_Name': 'Ivin_Pro', 'Test': 'UserIvin Getall Workers'}, {'_id': ObjectId('64d3468776792d708d8c32e2'), 'url': '/UserIvin-API/GetAllStateNames', 'method': 'GET', 'headers': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjk4ODM1OTE3LCJpYXQiOjE2OTEwNTk5MTcsImp0aSI6IjRkOTY5OGRiZjIxMjRlZThiZjMwOTQ5ZTFmMTM0ZDM0IiwidXNlcl9pZCI6M30.OT9N4Md_koAiGmj_oZny5b1FtniYBBJLGKB5AMWdWMo', 'payload': 'nan', 'staging_version': 'v3.2.0-Staging', 'EnvironmentName': 'http://172.105.37.117:8000/', 'Testcase_Version': '1.0.0.5', 'Project_Name': 'Ivin_Pro', 'Test': 'UserIvin Getall StateNames'}, {'_id': ObjectId('64d3468776792d708d8c32e1'), 'url': '/candidate_profile/DeleteSocialmedia/211/', 'method': 'DELETE', 'headers': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjk4ODM1OTE3LCJpYXQiOjE2OTEwNTk5MTcsImp0aSI6IjRkOTY5OGRiZjIxMjRlZThiZjMwOTQ5ZTFmMTM0ZDM0IiwidXNlcl9pZCI6M30.OT9N4Md_koAiGmj_oZny5b1FtniYBBJLGKB5AMWdWMo', 'payload': 'nan', 'staging_version': 'v3.2.0-Staging', 'EnvironmentName': 'http://172.105.37.117:8000/', 'Testcase_Version': '1.0.0.4', 'Project_Name': 'Ivin_Pro', 'Test': 'Socialmedia Delete'}, {'_id': ObjectId('64d3468776792d708d8c32e0'), 'url': '/candidate_profile/UpdateSocialmedia/203/', 'method': 'PUT', 'headers': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjk4ODM1OTE3LCJpYXQiOjE2OTEwNTk5MTcsImp0aSI6IjRkOTY5OGRiZjIxMjRlZThiZjMwOTQ5ZTFmMTM0ZDM0IiwidXNlcl9pZCI6M30.OT9N4Md_koAiGmj_oZny5b1FtniYBBJLGKB5AMWdWMo', 'payload': "{\n  'UserId': 1,\n  'SocialMediaType': 'Telegram',\n  'SocialMediaLink': 'https://playwright.dev/',\n  'SocialMediaDescription': 'Playwright'\n}", 'staging_version': 'v3.2.0-Staging', 'EnvironmentName': 'http://172.105.37.117:8000/', 'Testcase_Version': '1.0.0.3', 'Project_Name': 'Ivin_Pro', 'Test': 'Socialmedia Put'}, {'_id': ObjectId('64d3468776792d708d8c32df'), 'url': '/candidate_profile/GetallSocialmedia/', 'method': 'GET', 'headers': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjk4ODM1OTE3LCJpYXQiOjE2OTEwNTk5MTcsImp0aSI6IjRkOTY5OGRiZjIxMjRlZThiZjMwOTQ5ZTFmMTM0ZDM0IiwidXNlcl9pZCI6M30.OT9N4Md_koAiGmj_oZny5b1FtniYBBJLGKB5AMWdWMo', 'payload': 'nan', 'staging_version': 'v3.2.0-Staging', 'EnvironmentName': 'http://172.105.37.117:8000/', 'Testcase_Version': '1.0.0.2', 'Project_Name': 'Ivin_Pro', 'Test': 'Getall Socialmedia'}, {'_id': ObjectId('64d3468776792d708d8c32de'), 'url': '/candidate_profile/SocialmediaView/', 'method': 'POST', 'headers': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjk4ODM1OTE3LCJpYXQiOjE2OTEwNTk5MTcsImp0aSI6IjRkOTY5OGRiZjIxMjRlZThiZjMwOTQ5ZTFmMTM0ZDM0IiwidXNlcl9pZCI6M30.OT9N4Md_koAiGmj_oZny5b1FtniYBBJLGKB5AMWdWMo', 'payload': "{\n  'UserId': 1,\n  'SocialMediaType': 'Telegram',\n  'SocialMediaLink': 'https://playwright.dev/',\n  'SocialMediaDescription': 'Playwright'\n}", 'staging_version': 'v3.2.0-Staging', 'EnvironmentName': 'http://172.105.37.117:8000/', 'Testcase_Version': '1.0.0.1', 'Project_Name': 'Ivin_Pro', 'Test': 'Socialmedia Post'}]
+

Teardown

PASSED test_ivinget 0:00:00.528882

Setup

Call

Teardown

FAILED test_ivinupdate 0:00:00.493673

AssertionError: assert False
+ +  where False = <APIResponse url='http://172.105.37.117:8000/candidate_profile/UpdateSocialmedia/203/' status=400 status_text='Bad Request'>.ok

Setup

Call

api_ivin = <playwright._impl._fetch.APIRequestContext object at 0x0000016EC2A59450>
+
+    @pytest.mark.IvinPro_test
+    def test_ivinupdate(api_ivin: APIRequestContext) -> None:
+        ab = list2
+        for values in ab:
+            url = values['url']
+            method = values['method']
+            headers = values['headers']
+            payload = values['payload']
+            staging_version = values['staging_version']
+            EnvironmentName = values['EnvironmentName']
+            Testcase_Version = values['Testcase_Version']
+            Project_Name = values['Project_Name']
+            Test = values['Test']
+            headers23 = {'Content-Type': 'application/json', 'Authorization': f"Bearer {headers}"}
+            if method == 'PUT' and Test == 'Socialmedia Put':
+                cleaned_string = url.replace("\u200B", "")
+                put_todo = api_ivin.put(url=str(cleaned_string), headers=headers23, data=payload)
+                try:
+                    test1 = put_todo.json()
+                    if test1['Status'] == 200:
+                        data = {"Test Case-Id": "3",
+                                "Pre condition": "Updating Social media by using candidate profileid",
+                                "Flow ": "Update",
+                                "App Name": "Ivin_Pro",
+                                "Expected Output": "200",
+                                "Actual Output": str(test1),
+                                "Endpoint Name": str(url),
+                                "Section Name": "Candidate_Profile",
+                                "API Type": "User",
+                                "Status Code": test1['Status'],
+                                "Status": "Success",
+                                " TestCase Status API": "Pass TestCase",
+                                "Test Run Date": DateTime,
+                                "Test Releated To Version": str(staging_version),
+                                'Environment Name': EnvironmentName,
+                                'TestCase Version': Testcase_Version,
+                                'Project Name': Project_Name}
+                        collection1.insert_one(data)
+                    else:
+                        data = {"Test Case-Id": "3",
+                                "Pre condition": "Enter the valid details",
+                                "Flow ": "Update SocialMedia",
+                                "App Name": "Ivin_Pro",
+                                "Expected Output": "400",
+                                "Actual Output": str(test1),
+                                "Endpoint Name": str(url),
+                                "Section Name": "Candidate_Profile",
+                                "API Type": "User",
+                                "Status Code": test1['Status'],
+                                "Status": "Fail",
+                                " TestCase Status API": "Fail TestCase",
+                                "Test Run Date": DateTime,
+                                "Test Releated To Version": str(staging_version),
+                                'Environment Name': EnvironmentName,
+                                'TestCase Version': Testcase_Version,
+                                'Project Name': Project_Name}
+                        collection1.insert_one(data)
+                except Exception as e:
+                    data = {"Test Case-Id": "3",
+                            "Pre condition": "Give the correct url&data",
+                            "Flow ": "Update",
+                            "App Name": "Ivin_Pro",
+                            "Expected Output": '404',
+                            "Actual Output": str(put_todo),
+                            "Endpoint Name": str(url),
+                            "Section Name": "Candidate_Profile",
+                            "API Type": "User",
+                            "Status Code": 404,
+                            "Status": "Not Found",
+                            " TestCase Status API": "Fail TestCase",
+                            "Test Run Date": DateTime,
+                            "Test Releated To Version": str(staging_version),
+                            'Environment Name': EnvironmentName,
+                            'TestCase Version': Testcase_Version,
+                            'Project Name': Project_Name}
+                    collection1.insert_one(data)
+>               assert put_todo.ok
+E               AssertionError: assert False
+E                +  where False = <APIResponse url='http://172.105.37.117:8000/candidate_profile/UpdateSocialmedia/203/' status=400 status_text='Bad Request'>.ok
+
+test_testcases.py:864: AssertionError

Teardown

FAILED test_ivindelete 0:00:00.440584

AssertionError: assert False
+ +  where False = <APIResponse url='http://172.105.37.117:8000/candidate_profile/DeleteSocialmedia/211/' status=400 status_text='Bad Request'>.ok

Setup

Call

api_ivin = <playwright._impl._fetch.APIRequestContext object at 0x0000016EC2A59450>
+
+    @pytest.mark.IvinPro_test
+    def test_ivindelete(api_ivin: APIRequestContext) -> None:
+        ab = list2
+        for values in ab:
+            url = values['url']
+            method = values['method']
+            headers = values['headers']
+            payload = values['payload']
+            staging_version = values['staging_version']
+            EnvironmentName = values['EnvironmentName']
+            Testcase_Version = values['Testcase_Version']
+            Project_Name = values['Project_Name']
+            Test = values['Test']
+            headers23 = {'Content-Type': 'application/json', 'Authorization': f"Bearer {headers}"}
+            if method == 'DELETE' and Test == 'Socialmedia Delete':
+                cleaned_string = url.replace("\u200B", "")
+                delete_todo = api_ivin.delete(url=str(cleaned_string), headers=headers23, data=payload)
+                try:
+                    test1 = delete_todo.json()
+                    if test1['Status'] == 200:
+                        data = {"Test Case-Id": "4",
+                                "Pre condition": "Delete the Social media for particular candidate profileid",
+                                "Flow ": "Delete method",
+                                "App Name": "Ivin_Pro",
+                                "Expected Output": "200",
+                                "Actual Output": str(test1),
+                                "Endpoint Name": str(url),
+                                "Section Name": "Candidate_Profile",
+                                "API Type": "User",
+                                "Status Code": test1['Status'],
+                                "Status": "Success",
+                                " TestCase Status API": "Pass TestCase",
+                                "Test Run Date": DateTime,
+                                "Test Releated To Version": str(staging_version),
+                                'Environment Name': EnvironmentName,
+                                'TestCase Version': Testcase_Version,
+                                'Project Name': Project_Name}
+                        collection1.insert_one(data)
+                    else:
+                        data = {"Test Case-Id": "4",
+                                "Pre condition": "Enter the valid id",
+                                "Flow ": "Delete method",
+                                "App Name": "Ivin_Pro",
+                                "Expected Output": "400",
+                                "Actual Output": str(test1),
+                                "Endpoint Name": str(url),
+                                "Section Name": "Candidate_Profile",
+                                "API Type": "User",
+                                "Status Code": test1['Status'],
+                                "Status": "Fail",
+                                " TestCase Status API": "Fail TestCase",
+                                "Test Run Date": DateTime,
+                                "Test Releated To Version": str(staging_version),
+                                'Environment Name': EnvironmentName,
+                                'TestCase Version': Testcase_Version,
+                                'Project Name': Project_Name}
+                        collection1.insert_one(data)
+                except Exception as e:
+                    data = {"Test Case-Id": "4",
+                            "Pre condition": "Give the correct url&data",
+                            "Flow ": "Delete method",
+                            "App Name": "Ivin_Pro",
+                            "Expected Output": '404',
+                            "Actual Output": str(delete_todo),
+                            "Endpoint Name": str(url),
+                            "Section Name": "Candidate_Profile",
+                            "API Type": "User",
+                            "Status Code": 404,
+                            "Status": "Not Found",
+                            " TestCase Status API": "Fail TestCase",
+                            "Test Run Date": DateTime,
+                            "Test Releated To Version": str(staging_version),
+                            'Environment Name': EnvironmentName,
+                            'TestCase Version': Testcase_Version,
+                            'Project Name': Project_Name}
+                    collection1.insert_one(data)
+>               assert delete_todo.ok
+E               AssertionError: assert False
+E                +  where False = <APIResponse url='http://172.105.37.117:8000/candidate_profile/DeleteSocialmedia/211/' status=400 status_text='Bad Request'>.ok
+
+test_testcases.py:942: AssertionError

Teardown

PASSED test_ivingetallstates 0:00:03.307245

Setup

Call

Teardown

PASSED test_ivingetallworkers 0:00:00.316731

Setup

Call

Teardown

\ No newline at end of file diff --git a/POC/poc_automation/migrations/__pycache__/0001_initial.cpython-310.pyc b/POC/poc_automation/migrations/__pycache__/0001_initial.cpython-310.pyc deleted file mode 100644 index e6b9d4224c1e539b8520d3ec19b47af8c95e93d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1252 zcmaKs&u`N(6vrLMZPGSfyD_%GnM;tU#uXtL3<+AOQs{utO3sSsT`Yf-Rk)3l?SuHK?DlBMJ_-HNb_&nT4u3 zr&@E$n^WyMwJ@hTbEQox| zd?0X(gXs`&Pp3mU$a&fCLZ9cNAIV^`bOb~$`1XlPaFlNwR)W=!l#BrPO-JSZ3)+!7 zl2V*bO25wmZ(Oi+G5^`L*VNN~v6avC3J%e$g;_&m+*l+cM50~4V_aVP&$(%GjyHQ8 zNvwOEzZ#3E06^uaMCEvD#sfK$3CLuiWTt7cSZlL9=8{F@@e$)aRN(^*z*fO+8k@&L zSJgTUMG~flLf<%32IK5hFs7M~2TS%8jY}BC%&4_Y7p(bAzcY{iX5ZN2zk9n3M|^d^ zl&ku6)2MvvLBBkX>IByQHumsD@vrDjz124mp`3c*U{$+`9mc&|1>he3A0(@z=~CBP GvHt+$s$FUT diff --git a/POC/poc_automation/migrations/__pycache__/__init__.cpython-310.pyc b/POC/poc_automation/migrations/__pycache__/__init__.cpython-310.pyc deleted file mode 100644 index 10a4ef90346965896791bbc4eee49d4814e3fe84..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 152 zcmd1j<>g`kg5N(*q=4whAOaaM0yz#qT+9L_QW%06G#UL?G8BP?5yUTRH>;R}{AAt4 z(vtk##FEV9#FzkoXOK`lOejAuCO0#^2q>AKR~!=`pP83g5+AQuP
Test Report

Summary

14
6 failed 8 passed

Tests

test_sample_testcases.py 68 0:00:34.375546

PASSED test_getalergies 0:00:02.584031

Setup

Captured stdout setup
8 entries
-

Call

Captured stdout call
7
-/User/GetLabLevelsByFamilyId/1
-/User/AnthropometricsGetByUserId/1/
-/User/RemoveUserApi/291/
-/User/UserAddressUpdate/133/
-/User/AllergiesGetApi/
-/User/Allergies/
-/User/AnthropometricsGetByFamilyById/1
-

Teardown

PASSED test_example 0:00:01.127254

Setup

Call

Captured stdout call
6
-/User/GetLabLevelsByFamilyId/1
-/User/AnthropometricsGetByUserId/1/
-/User/RemoveUserApi/291/
-/User/UserAddressUpdate/133/
-/User/AllergiesGetApi/
-/User/Allergies/
-

Teardown

FAILED test_lifeeazypost 0:00:00.772662

AssertionError: assert False
- +  where False = <APIResponse url='http://staging-api.vivifyhealthcare.com/User/Allergies/' status=400 status_text='Bad Request'>.ok

Setup

Call

api_lifeeazy = <playwright._impl._fetch.APIRequestContext object at 0x000001D9A9DD4730>
+    
Test Report

Summary

6
3 failed 3 passed

Tests

test_testcases.py 33 0:00:04.834689

FAILED test_lifeeazypost 0:00:01.644355

AssertionError: assert False
+ +  where False = <APIResponse url='http://staging-api.vivifyhealthcare.com/User/Allergies/' status=400 status_text='Bad Request'>.ok

Setup

Captured stdout setup
6 entries
+

Call

api_lifeeazy = <playwright._impl._fetch.APIRequestContext object at 0x0000020354DE1AE0>
 
+    @pytest.mark.Lifeeazy_test
     def test_lifeeazypost(api_lifeeazy: APIRequestContext) -> None:
         ab = list1
         for values in ab:
@@ -58,7 +44,7 @@
                                 'Environment Name': EnvironmentName,
                                 "TestCase Version": Testcase_Version,
                                 "Project Name": Project_Name}
-                        collection1.insert_one(data)
+                        collection2.insert_one(data)
                         # if values in list1:
                         #     list1.remove(values)
                         #     print(len(list1), "mani")
@@ -82,7 +68,7 @@
                                 'Environment Name': EnvironmentName,
                                 'TestCase Version': Testcase_Version,
                                 'Project Name': Project_Name}
-                        collection1.insert_one(data)
+                        collection2.insert_one(data)
                         # if values in list1:
                         #     list1.remove(values)
                         #     print(len(list1),"mani")
@@ -107,7 +93,7 @@
                             'Environment Name': EnvironmentName,
                             'TestCase Version': Testcase_Version,
                             'Project Name': Project_Name}
-                    collection1.insert_one(data)
+                    collection2.insert_one(data)
                     # if values in list1:
                     #     list1.remove(values)
                     #     print(len(list1), "mani")
@@ -117,9 +103,10 @@
 E               AssertionError: assert False
 E                +  where False = <APIResponse url='http://staging-api.vivifyhealthcare.com/User/Allergies/' status=400 status_text='Bad Request'>.ok
 
-test_sample_testcases.py:338: AssertionError

Teardown

PASSED test_lifeeazyget 0:00:01.502018

Setup

Call

Teardown

FAILED test_lifeeazyupdate 0:00:01.341278

AssertionError: assert False
- +  where False = <APIResponse url='http://staging-api.vivifyhealthcare.com/User/UserAddressUpdate/133/' status=500 status_text='Internal Server Error'>.ok

Setup

Call

api_lifeeazy = <playwright._impl._fetch.APIRequestContext object at 0x000001D9A9DD4730>
+test_testcases.py:156: AssertionError

Teardown

PASSED test_lifeeazyget 0:00:00.503384

Setup

Call

Teardown

FAILED test_lifeeazyupdate 0:00:00.485305

AssertionError: assert False
+ +  where False = <APIResponse url='http://staging-api.vivifyhealthcare.com/User/UserAddressUpdate/133/' status=500 status_text='Internal Server Error'>.ok

Setup

Call

api_lifeeazy = <playwright._impl._fetch.APIRequestContext object at 0x0000020354DE1AE0>
 
+    @pytest.mark.Lifeeazy_test
     def test_lifeeazyupdate(api_lifeeazy: APIRequestContext) -> None:
         ab = list1
         for values in ab:
@@ -156,7 +143,7 @@
                                 'Environment Name': EnvironmentName,
                                 'TestCase Version': Testcase_Version,
                                 'Project Name': Project_Name}
-                        collection1.insert_one(data)
+                        collection2.insert_one(data)
                         # if values in list1:
                         #     list1.remove(values)
                         #     print(len(list1), "mani")
@@ -180,7 +167,7 @@
                                 'Environment Name': EnvironmentName,
                                 'TestCase Version': Testcase_Version,
                                 'Project Name': Project_Name}
-                        collection1.insert_one(data)
+                        collection2.insert_one(data)
                         # if values in list1:
                         #     list1.remove(values)
                         #     print(len(list1), "mani")
@@ -204,7 +191,7 @@
                             'Environment Name': EnvironmentName,
                             'TestCase Version': Testcase_Version,
                             'Project Name': Project_Name}
-                    collection1.insert_one(data)
+                    collection2.insert_one(data)
                     # if values in list1:
                     #     list1.remove(values)
                     #     print(len(list1), "mani")
@@ -214,9 +201,10 @@
 E               AssertionError: assert False
 E                +  where False = <APIResponse url='http://staging-api.vivifyhealthcare.com/User/UserAddressUpdate/133/' status=500 status_text='Internal Server Error'>.ok
 
-test_sample_testcases.py:525: AssertionError

Teardown

FAILED test_lifeeazydelete 0:00:01.551486

AssertionError: assert False
- +  where False = <APIResponse url='http://staging-api.vivifyhealthcare.com/User/RemoveUserApi/291/' status=400 status_text='Bad Request'>.ok

Setup

Call

api_lifeeazy = <playwright._impl._fetch.APIRequestContext object at 0x000001D9A9DD4730>
+test_testcases.py:347: AssertionError

Teardown

FAILED test_lifeeazydelete 0:00:00.481285

AssertionError: assert False
+ +  where False = <APIResponse url='http://staging-api.vivifyhealthcare.com/User/RemoveUserApi/291/' status=400 status_text='Bad Request'>.ok

Setup

Call

api_lifeeazy = <playwright._impl._fetch.APIRequestContext object at 0x0000020354DE1AE0>
 
+    @pytest.mark.Lifeeazy_test
     def test_lifeeazydelete(api_lifeeazy: APIRequestContext) -> None:
         ab = list1
         for values in ab:
@@ -253,7 +241,7 @@
                                 'Environment Name': EnvironmentName,
                                 'TestCase Version': Testcase_Version,
                                 'Project Name': Project_Name}
-                        collection1.insert_one(data)
+                        collection2.insert_one(data)
                         # if values in list1:
                         #     list1.remove(values)
                         #     print(len(list1), "mani")
@@ -277,7 +265,7 @@
                                 'Environment Name': EnvironmentName,
                                 'TestCase Version': Testcase_Version,
                                 'Project Name': Project_Name}
-                        collection1.insert_one(data)
+                        collection2.insert_one(data)
                         # if values in list1:
                         #     list1.remove(values)
                         #     print(len(list1), "mani")
@@ -301,7 +289,7 @@
                             'Environment Name': EnvironmentName,
                             'TestCase Version': Testcase_Version,
                             'Project Name': Project_Name}
-                    collection1.insert_one(data)
+                    collection2.insert_one(data)
                     # if values in list1:
                     #     list1.remove(values)
                     #     print(len(list1), "mani")
@@ -311,262 +299,4 @@
 E               AssertionError: assert False
 E                +  where False = <APIResponse url='http://staging-api.vivifyhealthcare.com/User/RemoveUserApi/291/' status=400 status_text='Bad Request'>.ok
 
-test_sample_testcases.py:617: AssertionError

Teardown

PASSED test_example1 0:00:02.042268

Setup

Call

Captured stdout call
5
-/User/GetLabLevelsByFamilyId/1
-/User/RemoveUserApi/291/
-/User/UserAddressUpdate/133/
-/User/AllergiesGetApi/
-/User/Allergies/
-

Teardown

PASSED test_example2 0:00:03.018234

Setup

Call

Captured stdout call
4
-/User/RemoveUserApi/291/
-/User/UserAddressUpdate/133/
-/User/AllergiesGetApi/
-/User/Allergies/
-

Teardown

FAILED test_ivinpost 0:00:02.377819

AssertionError: assert False
- +  where False = <APIResponse url='http://172.105.37.117:8000/candidate_profile/SocialmediaView/' status=400 status_text='Bad Request'>.ok

Setup

Captured stdout setup
6 entries
-

Call

api_ivin = <playwright._impl._fetch.APIRequestContext object at 0x000001D9A9DD75E0>
-
-    def test_ivinpost(api_ivin: APIRequestContext) -> None:
-        ab = list2
-        for values in ab:
-            url = values['url']
-            method = values['method']
-            headers = values['headers']
-            payload = values['payload']
-            staging_version = values['staging_version']
-            EnvironmentName = values['EnvironmentName']
-            Testcase_Version = values['Testcase_Version']
-            Project_Name = values['Project_Name']
-            Test = values['Test']
-            headers23 = {'Content-Type': 'application/json', 'Authorization': f"Bearer {headers}"}
-            if method == 'POST' and Test == 'Spost':
-                cleaned_string = url.replace("\u200B", "")
-                post_todo = api_ivin.post(url=str(cleaned_string), headers=headers23, data=payload)
-                try:
-                    test1 = post_todo.json()
-                    if test1['Status'] == 200:
-                        data = {"Test Case-Id": "1",
-                                "Pre condition": "Add the candidate profile for social media view",
-                                "Flow ": "SociaMedia Post",
-                                "App Name": "Ivin_Pro",
-                                "Expected Output": "200",
-                                "Actual Output": str(test1),
-                                "Endpoint Name": str(url),
-                                "Section Name": "Candidate_Profile",
-                                "API Type": "User",
-                                "Status Code": test1['Status'],
-                                "Status": "Success",
-                                " TestCase Status API": "Pass TestCase",
-                                "Test Run Date": DateTime,
-                                "Test Releated To Version": str(staging_version),
-                                'Environment Name': EnvironmentName,
-                                'TestCase Version': Testcase_Version,
-                                'Project Name': Project_Name}
-                        collection2.insert_one(data)
-                    else:
-                        data = {"Test Case-Id": "1",
-                                "Pre condition": "Add the candidate profile for social media view",
-                                "Flow ": "SociaMedia Post",
-                                "App Name": "Ivin_Pro",
-                                "Expected Output": "400",
-                                "Actual Output": str(test1),
-                                "Endpoint Name": str(url),
-                                "Section Name": "Candidate_Profile",
-                                "API Type": "User",
-                                "Status Code": test1['Status'],
-                                "Status": "Fail",
-                                " TestCase Status API": "Fail TestCase",
-                                "Test Run Date": DateTime,
-                                "Test Releated To Version": str(staging_version),
-                                'Environment Name': EnvironmentName,
-                                'TestCase Version': Testcase_Version,
-                                'Project Name': Project_Name}
-                        collection2.insert_one(data)
-                except Exception as e:
-                    data = {"Test Case-Id": "1",
-                            "Pre condition": "Give the correct url&data",
-                            "Flow ": "SociaMedia Post",
-                            "App Name": "Ivin_Pro",
-                            "Expected Output": '404',
-                            "Actual Output": str(post_todo),
-                            "Endpoint Name": str(url),
-                            "Section Name": "Candidate_Profile",
-                            "API Type": "User",
-                            "Status Code": 404,
-                            "Status": "Not Found",
-                            " TestCase Status API": "Fail TestCase",
-                            "Test Run Date": DateTime,
-                            "Test Releated To Version": str(staging_version),
-                            'Environment Name': EnvironmentName,
-                            'TestCase Version': Testcase_Version,
-                            'Project Name': Project_Name}
-                    collection2.insert_one(data)
->               assert post_todo.ok
-E               AssertionError: assert False
-E                +  where False = <APIResponse url='http://172.105.37.117:8000/candidate_profile/SocialmediaView/' status=400 status_text='Bad Request'>.ok
-
-test_sample_testcases.py:878: AssertionError

Teardown

PASSED test_ivinget 0:00:02.468406

Setup

Call

Teardown

FAILED test_ivinupdate 0:00:01.191471

AssertionError: assert False
- +  where False = <APIResponse url='http://172.105.37.117:8000/candidate_profile/UpdateSocialmedia/203/' status=400 status_text='Bad Request'>.ok

Setup

Call

api_ivin = <playwright._impl._fetch.APIRequestContext object at 0x000001D9A9DD75E0>
-
-    def test_ivinupdate(api_ivin: APIRequestContext) -> None:
-        ab = list2
-        for values in ab:
-            url = values['url']
-            method = values['method']
-            headers = values['headers']
-            payload = values['payload']
-            staging_version = values['staging_version']
-            EnvironmentName = values['EnvironmentName']
-            Testcase_Version = values['Testcase_Version']
-            Project_Name = values['Project_Name']
-            Test = values['Test']
-            headers23 = {'Content-Type': 'application/json', 'Authorization': f"Bearer {headers}"}
-            if method == 'PUT' and Test == 'Sput':
-                cleaned_string = url.replace("\u200B", "")
-                put_todo = api_ivin.put(url=str(cleaned_string), headers=headers23, data=payload)
-                try:
-                    test1 = put_todo.json()
-                    if test1['Status'] == 200:
-                        data = {"Test Case-Id": "3",
-                                "Pre condition": "Updating Social media by using candidate profileid",
-                                "Flow ": "Update",
-                                "App Name": "Ivin_Pro",
-                                "Expected Output": "200",
-                                "Actual Output": str(test1),
-                                "Endpoint Name": str(url),
-                                "Section Name": "Candidate_Profile",
-                                "API Type": "User",
-                                "Status Code": test1['Status'],
-                                "Status": "Success",
-                                " TestCase Status API": "Pass TestCase",
-                                "Test Run Date": DateTime,
-                                "Test Releated To Version": str(staging_version),
-                                'Environment Name': EnvironmentName,
-                                'TestCase Version': Testcase_Version,
-                                'Project Name': Project_Name}
-                        collection2.insert_one(data)
-                    else:
-                        data = {"Test Case-Id": "3",
-                                "Pre condition": "Enter the valid details",
-                                "Flow ": "Update SocialMedia",
-                                "App Name": "Ivin_Pro",
-                                "Expected Output": "400",
-                                "Actual Output": str(test1),
-                                "Endpoint Name": str(url),
-                                "Section Name": "Candidate_Profile",
-                                "API Type": "User",
-                                "Status Code": test1['Status'],
-                                "Status": "Fail",
-                                " TestCase Status API": "Fail TestCase",
-                                "Test Run Date": DateTime,
-                                "Test Releated To Version": str(staging_version),
-                                'Environment Name': EnvironmentName,
-                                'TestCase Version': Testcase_Version,
-                                'Project Name': Project_Name}
-                        collection2.insert_one(data)
-                except Exception as e:
-                    data = {"Test Case-Id": "3",
-                            "Pre condition": "Give the correct url&data",
-                            "Flow ": "Update",
-                            "App Name": "Ivin_Pro",
-                            "Expected Output": '404',
-                            "Actual Output": str(put_todo),
-                            "Endpoint Name": str(url),
-                            "Section Name": "Candidate_Profile",
-                            "API Type": "User",
-                            "Status Code": 404,
-                            "Status": "Not Found",
-                            " TestCase Status API": "Fail TestCase",
-                            "Test Run Date": DateTime,
-                            "Test Releated To Version": str(staging_version),
-                            'Environment Name': EnvironmentName,
-                            'TestCase Version': Testcase_Version,
-                            'Project Name': Project_Name}
-                    collection2.insert_one(data)
->               assert put_todo.ok
-E               AssertionError: assert False
-E                +  where False = <APIResponse url='http://172.105.37.117:8000/candidate_profile/UpdateSocialmedia/203/' status=400 status_text='Bad Request'>.ok
-
-test_sample_testcases.py:1032: AssertionError

Teardown

FAILED test_ivindelete 0:00:04.813745

AssertionError: assert False
- +  where False = <APIResponse url='http://172.105.37.117:8000/candidate_profile/DeleteSocialmedia/211/' status=400 status_text='Bad Request'>.ok

Setup

Call

api_ivin = <playwright._impl._fetch.APIRequestContext object at 0x000001D9A9DD75E0>
-
-    def test_ivindelete(api_ivin: APIRequestContext) -> None:
-        ab = list2
-        for values in ab:
-            url = values['url']
-            method = values['method']
-            headers = values['headers']
-            payload = values['payload']
-            staging_version = values['staging_version']
-            EnvironmentName = values['EnvironmentName']
-            Testcase_Version = values['Testcase_Version']
-            Project_Name = values['Project_Name']
-            Test = values['Test']
-            headers23 = {'Content-Type': 'application/json', 'Authorization': f"Bearer {headers}"}
-            if method == 'DELETE' and Test == 'Sdelete':
-                cleaned_string = url.replace("\u200B", "")
-                delete_todo = api_ivin.delete(url=str(cleaned_string), headers=headers23, data=payload)
-                try:
-                    test1 = delete_todo.json()
-                    if test1['Status'] == 200:
-                        data = {"Test Case-Id": "4",
-                                "Pre condition": "Delete the Social media for particular candidate profileid",
-                                "Flow ": "Delete method",
-                                "App Name": "Ivin_Pro",
-                                "Expected Output": "200",
-                                "Actual Output": str(test1),
-                                "Endpoint Name": str(url),
-                                "Section Name": "Candidate_Profile",
-                                "API Type": "User",
-                                "Status Code": test1['Status'],
-                                "Status": "Success",
-                                " TestCase Status API": "Pass TestCase",
-                                "Test Run Date": DateTime,
-                                "Test Releated To Version": str(staging_version),
-                                'Environment Name': EnvironmentName,
-                                'TestCase Version': Testcase_Version,
-                                'Project Name': Project_Name}
-                        collection2.insert_one(data)
-                    else:
-                        data = {"Test Case-Id": "4",
-                                "Pre condition": "Enter the valid id",
-                                "Flow ": "Delete method",
-                                "App Name": "Ivin_Pro",
-                                "Expected Output": "400",
-                                "Actual Output": str(test1),
-                                "Endpoint Name": str(url),
-                                "Section Name": "Candidate_Profile",
-                                "API Type": "User",
-                                "Status Code": test1['Status'],
-                                "Status": "Fail",
-                                " TestCase Status API": "Fail TestCase",
-                                "Test Run Date": DateTime,
-                                "Test Releated To Version": str(staging_version),
-                                'Environment Name': EnvironmentName,
-                                'TestCase Version': Testcase_Version,
-                                'Project Name': Project_Name}
-                        collection2.insert_one(data)
-                except Exception as e:
-                    data = {"Test Case-Id": "4",
-                            "Pre condition": "Give the correct url&data",
-                            "Flow ": "Delete method",
-                            "App Name": "Ivin_Pro",
-                            "Expected Output": '404',
-                            "Actual Output": str(delete_todo),
-                            "Endpoint Name": str(url),
-                            "Section Name": "Candidate_Profile",
-                            "API Type": "User",
-                            "Status Code": 404,
-                            "Status": "Not Found",
-                            " TestCase Status API": "Fail TestCase",
-                            "Test Run Date": DateTime,
-                            "Test Releated To Version": str(staging_version),
-                            'Environment Name': EnvironmentName,
-                            'TestCase Version': Testcase_Version,
-                            'Project Name': Project_Name}
-                    collection2.insert_one(data)
->               assert delete_todo.ok
-E               AssertionError: assert False
-E                +  where False = <APIResponse url='http://172.105.37.117:8000/candidate_profile/DeleteSocialmedia/211/' status=400 status_text='Bad Request'>.ok
-
-test_sample_testcases.py:1109: AssertionError

Teardown

PASSED test_ivingetall 0:00:05.417862

Setup

Call

Teardown

PASSED test_ivingetall1 0:00:04.167011

Setup

Call

Teardown

\ No newline at end of file +test_testcases.py:441: AssertionError

Teardown

PASSED test_lifeeazyanthrobyfamid 0:00:01.123106

Setup

Call

Teardown

PASSED test_lifeeazyanthrobyuserid 0:00:00.597255

Setup

Call

Teardown

\ No newline at end of file diff --git a/POC/poc_automation/serializers.py b/POC/poc_automation/serializers.py index 66e2a2c..4ffcb18 100644 --- a/POC/poc_automation/serializers.py +++ b/POC/poc_automation/serializers.py @@ -2,32 +2,31 @@ from .models import InputModel,lifeeazyModel -class MyModelSerializer(serializers.ModelSerializer): +class IvinSerializer(serializers.ModelSerializer): class Meta: model = InputModel fields = '__all__' -class lifeSerializer(serializers.ModelSerializer): + +class IvinProjectSerializer(serializers.ModelSerializer): + class Meta: + model = InputModel + fields = ['Project_Name'] + +class lifeeazySerializer(serializers.ModelSerializer): objects = None class Meta: model = lifeeazyModel fields = '__all__' -class lifeeazySerializer(serializers.ModelSerializer): +class lifeeazyProjectSerializer(serializers.ModelSerializer): class Meta: model = lifeeazyModel fields = ['Project_Name'] -class MydataSerializer(serializers.ModelSerializer): - class Meta: - model = InputModel - fields = '__all__' -class ProjectSerializer(serializers.ModelSerializer): - class Meta: - model = InputModel - fields = ['Project_Name'] + # def create(self, validated_data): diff --git a/POC/poc_automation/test_sample_testcases.py b/POC/poc_automation/test_testcases.py similarity index 81% rename from POC/poc_automation/test_sample_testcases.py rename to POC/poc_automation/test_testcases.py index bc7b124..c2fdea2 100644 --- a/POC/poc_automation/test_sample_testcases.py +++ b/POC/poc_automation/test_testcases.py @@ -20,15 +20,15 @@ except: myclient = pymongo.MongoClient("mongodb://localhost:27017/") mydb = myclient[a] -collection1 = mydb["Output_FirstData"] -collection2 = mydb["Output_SecondData"] +collection1 = mydb["Poc_Output_IvinPro"] +collection2 = mydb["Poc_Output_Lifeeazy"] client = MongoClient('mongodb://localhost:27017/') db = client['poc'] -results_collection1 = db['Input_LifeeazyData'] -results_collection2 = db['Input_IvinProData'] +results_collection1 = db['Poc_Input_IvinPro'] +results_collection2 = db['Poc_Input_Lifeeazy'] def get1_entries(): - c = results_collection1.find().sort("_id", -1).limit(8) + c = results_collection2.find().sort("_id", -1).limit(6) entries = [] for i in c: entries.append(i) @@ -36,7 +36,7 @@ def get1_entries(): return entries def get2_entries(): - k = results_collection2.find().sort("_id", -1).limit(6) + k = results_collection1.find().sort("_id", -1).limit(6) entries = [] for j in k: entries.append(j) @@ -44,206 +44,24 @@ def get2_entries(): return entries @pytest.fixture(scope="session") def api_lifeeazy(playwright: Playwright) -> Generator[APIRequestContext, None, None]: - request_context = playwright.request.new_context(base_url="http://staging-api.vivifyhealthcare.com/") global list1 list1 = get1_entries() + n = list1[0]['EnvironmentName'] + request_context = playwright.request.new_context(base_url=str(n)) yield request_context request_context.dispose() @pytest.fixture(scope="session") def api_ivin(playwright: Playwright) -> Generator[APIRequestContext, None, None]: - request_context = playwright.request.new_context(base_url="http://172.105.37.117:8000/") global list2 list2 = get2_entries() + ba = list2[0]['EnvironmentName'] + request_context = playwright.request.new_context(base_url=str(ba)) yield request_context request_context.dispose() - -def test_getalergies(api_lifeeazy: APIRequestContext) -> None: - ac = list1 - for values in ac: - url = values['url'] - method = values['method'] - headers = values['headers'] - payload = values['payload'] - staging_version = values['staging_version'] - EnvironmentName = values['EnvironmentName'] - Testcase_Version = values['Testcase_Version'] - Project_Name = values['Project_Name'] - Test = values['Test'] - headers23 = {'Content-Type': 'application/json', 'Authorization': f"Bearer {headers}"} - if method == 'GET' and Test == 'Allergiesbyuserid Get': - cleaned_string = url.replace("\u200B", "") - get_todo = api_lifeeazy.get(url=str(cleaned_string), headers=headers23) - try: - test1 = get_todo.json() - if test1['Status'] == 200: - data = {"Test Case-Id": "5", - "Pre condition": "Allergies data based on Userid", - "Flow ": "Get", - "App Name": "Lifeeazy", - "Expected Output": "200", - "Actual Output": str(test1), - "Endpoint Name": str(url), - "Section Name": "User", - "API Type": "User", - "Status Code": test1['Status'], - "Status": "Success", - " TestCase Status API": "Pass TestCase", - "Test Run Date": DateTime, - "Test Releated To Version": str(staging_version), - 'Environment Name': EnvironmentName, - 'TestCase Version': Testcase_Version, - 'Project Name': Project_Name} - collection1.insert_one(data) - if values in list1: - list1.remove(values) - print(len(list1)) - for j in list1: - print(j['url']) - else: - data = {"Test Case-Id": "5", - "Pre condition": "Enter the correct userid", - "Flow ": "Get", - "App Name": "Lifeeazy", - "Expected Output": "400", - "Actual Output": str(test1), - "Endpoint Name": str(url), - "Section Name": "User", - "API Type": "User", - "Status Code": test1['Status'], - "Status": "Fail", - " TestCase Status API": "Fail TestCase", - "Test Run Date": DateTime, - "Test Releated To Version": str(staging_version), - 'Environment Name': EnvironmentName, - 'TestCase Version': Testcase_Version, - 'Project Name': Project_Name} - collection1.insert_one(data) - if values in list1: - list1.remove(values) - print(len(list1)) - for j in list1: - print(j['url']) - except Exception as e: - data = {"Test Case-Id": "5", - "Pre condition": "Give the correct url&data", - "Flow ": "Get", - "App Name": "Lifeeazy", - "Expected Output": '404', - "Actual Output": str(get_todo), - "Endpoint Name": str(url), - "Section Name": "User", - "API Type": "User", - "Status Code": 404, - "Status": "Not Found", - " TestCase Status API": "Fail TestCase", - "Test Run Date": DateTime, - "Test Releated To Version": str(staging_version), - 'Environment Name': EnvironmentName, - 'TestCase Version': Testcase_Version, - 'Project Name': Project_Name} - collection1.insert_one(data) - if values in list1: - list1.remove(values) - print(len(list1)) - for j in list1: - print(j['url']) - assert get_todo.ok - -def test_example(api_lifeeazy: APIRequestContext) -> None: - ac = list1 - for values in ac: - url = values['url'] - method = values['method'] - headers = values['headers'] - payload = values['payload'] - staging_version = values['staging_version'] - EnvironmentName = values['EnvironmentName'] - Testcase_Version = values['Testcase_Version'] - Project_Name = values['Project_Name'] - Test = values['Test'] - headers23 = {'Content-Type': 'application/json', 'Authorization': f"Bearer {headers}"} - if method == 'GET' and Test == 'Anthropometricsbyfamilyid Get': - cleaned_string = url.replace("\u200B", "") - get_todo = api_lifeeazy.get(url=str(cleaned_string), headers=headers23) - try: - test1 = get_todo.json() - if test1['Status'] == 200: - data = {"Test Case-Id": "6", - "Pre condition": "Get the Anthropometric data based on FamilyId", - "Flow ": "Get", - "App Name": "Lifeeazy", - "Expected Output": "200", - "Actual Output": str(test1), - "Endpoint Name": str(url), - "Section Name": "User", - "API Type": "User", - "Status Code": test1['Status'], - "Status": "Success", - " TestCase Status API": "Pass TestCase", - "Test Run Date": DateTime, - "Test Releated To Version": str(staging_version), - 'Environment Name': EnvironmentName, - 'TestCase Version': Testcase_Version, - 'Project Name': Project_Name} - collection1.insert_one(data) - if values in list1: - list1.remove(values) - print(len(list1)) - for j in list1: - print(j['url']) - else: - data = {"Test Case-Id": "6", - "Pre condition": "Enter the correct familyid", - "Flow ": "Get", - "App Name": "Lifeeazy", - "Expected Output": "400", - "Actual Output": str(test1), - "Endpoint Name": str(url), - "Section Name": "User", - "API Type": "User", - "Status Code": test1['Status'], - "Status": "Fail", - " TestCase Status API": "Fail TestCase", - "Test Run Date": DateTime, - "Test Releated To Version": str(staging_version), - 'Environment Name': EnvironmentName, - 'TestCase Version': Testcase_Version, - 'Project Name': Project_Name} - collection1.insert_one(data) - if values in list1: - list1.remove(values) - print(len(list1)) - for j in list1: - print(j['url']) - except Exception as e: - data = {"Test Case-Id": "6", - "Pre condition": "Give the correct url&data", - "Flow ": "Get", - "App Name": "Lifeeazy", - "Expected Output": '404', - "Actual Output": str(get_todo), - "Endpoint Name": str(url), - "Section Name": "User", - "API Type": "User", - "Status Code": 404, - "Status": "Not Found", - " TestCase Status API": "Fail TestCase", - "Test Run Date": DateTime, - "Test Releated To Version": str(staging_version), - 'Environment Name': EnvironmentName, - 'TestCase Version': Testcase_Version, - 'Project Name': Project_Name} - collection1.insert_one(data) - if values in list1: - list1.remove(values) - print(len(list1),) - for j in list1: - print(j['url']) - assert get_todo.ok - +@pytest.mark.Lifeeazy_test def test_lifeeazypost(api_lifeeazy: APIRequestContext) -> None: ab = list1 for values in ab: @@ -280,7 +98,7 @@ def test_lifeeazypost(api_lifeeazy: APIRequestContext) -> None: 'Environment Name': EnvironmentName, "TestCase Version": Testcase_Version, "Project Name": Project_Name} - collection1.insert_one(data) + collection2.insert_one(data) # if values in list1: # list1.remove(values) # print(len(list1), "mani") @@ -304,7 +122,7 @@ def test_lifeeazypost(api_lifeeazy: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection1.insert_one(data) + collection2.insert_one(data) # if values in list1: # list1.remove(values) # print(len(list1),"mani") @@ -329,7 +147,7 @@ def test_lifeeazypost(api_lifeeazy: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection1.insert_one(data) + collection2.insert_one(data) # if values in list1: # list1.remove(values) # print(len(list1), "mani") @@ -337,6 +155,8 @@ def test_lifeeazypost(api_lifeeazy: APIRequestContext) -> None: # print(j['url']) assert post_todo.ok + +@pytest.mark.Lifeeazy_test def test_lifeeazyget(api_lifeeazy: APIRequestContext) -> None: ab = list1 for values in ab: @@ -376,7 +196,7 @@ def test_lifeeazyget(api_lifeeazy: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection1.insert_one(data) + collection2.insert_one(data) # if values in list1: # list1.remove(values) # print(len(list1), "mani") @@ -400,7 +220,7 @@ def test_lifeeazyget(api_lifeeazy: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection1.insert_one(data) + collection2.insert_one(data) # if values in list1: # list1.remove(values) # print(len(list1), "mani") @@ -424,7 +244,7 @@ def test_lifeeazyget(api_lifeeazy: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection1.insert_one(data) + collection2.insert_one(data) # if values in list1: # list1.remove(values) # print(len(list1), "mani") @@ -432,6 +252,8 @@ def test_lifeeazyget(api_lifeeazy: APIRequestContext) -> None: # print(j['url']) assert get_todo.ok + +@pytest.mark.Lifeeazy_test def test_lifeeazyupdate(api_lifeeazy: APIRequestContext) -> None: ab = list1 for values in ab: @@ -468,7 +290,7 @@ def test_lifeeazyupdate(api_lifeeazy: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection1.insert_one(data) + collection2.insert_one(data) # if values in list1: # list1.remove(values) # print(len(list1), "mani") @@ -492,7 +314,7 @@ def test_lifeeazyupdate(api_lifeeazy: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection1.insert_one(data) + collection2.insert_one(data) # if values in list1: # list1.remove(values) # print(len(list1), "mani") @@ -516,7 +338,7 @@ def test_lifeeazyupdate(api_lifeeazy: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection1.insert_one(data) + collection2.insert_one(data) # if values in list1: # list1.remove(values) # print(len(list1), "mani") @@ -524,6 +346,8 @@ def test_lifeeazyupdate(api_lifeeazy: APIRequestContext) -> None: # print(j['url']) assert put_todo.ok + +@pytest.mark.Lifeeazy_test def test_lifeeazydelete(api_lifeeazy: APIRequestContext) -> None: ab = list1 for values in ab: @@ -560,7 +384,7 @@ def test_lifeeazydelete(api_lifeeazy: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection1.insert_one(data) + collection2.insert_one(data) # if values in list1: # list1.remove(values) # print(len(list1), "mani") @@ -584,7 +408,7 @@ def test_lifeeazydelete(api_lifeeazy: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection1.insert_one(data) + collection2.insert_one(data) # if values in list1: # list1.remove(values) # print(len(list1), "mani") @@ -608,7 +432,7 @@ def test_lifeeazydelete(api_lifeeazy: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection1.insert_one(data) + collection2.insert_one(data) # if values in list1: # list1.remove(values) # print(len(list1), "mani") @@ -616,7 +440,9 @@ def test_lifeeazydelete(api_lifeeazy: APIRequestContext) -> None: # print(j['url']) assert delete_todo.ok -def test_example1(api_lifeeazy: APIRequestContext) -> None: + +@pytest.mark.Lifeeazy_test +def test_lifeeazyanthrobyfamid(api_lifeeazy: APIRequestContext) -> None: ac = list1 for values in ac: url = values['url'] @@ -629,14 +455,14 @@ def test_example1(api_lifeeazy: APIRequestContext) -> None: Project_Name = values['Project_Name'] Test = values['Test'] headers23 = {'Content-Type': 'application/json', 'Authorization': f"Bearer {headers}"} - if method == 'GET' and Test == 'Anthropometricsbyuserid Get': + if method == 'GET' and Test == 'Anthropometricsbyfamilyid Get': cleaned_string = url.replace("\u200B", "") get_todo = api_lifeeazy.get(url=str(cleaned_string), headers=headers23) try: test1 = get_todo.json() if test1['Status'] == 200: - data = {"Test Case-Id": "7", - "Pre condition": "Get the Anthropometric data based on UserId", + data = {"Test Case-Id": "5", + "Pre condition": "Get the Anthropometric data based on FamilyId", "Flow ": "Get", "App Name": "Lifeeazy", "Expected Output": "200", @@ -652,15 +478,15 @@ def test_example1(api_lifeeazy: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection1.insert_one(data) - if values in list1: - list1.remove(values) - print(len(list1)) - for j in list1: - print(j['url']) + collection2.insert_one(data) + # if values in list1: + # list1.remove(values) + # print(len(list1)) + # for j in list1: + # print(j['url']) else: - data = {"Test Case-Id": "7", - "Pre condition": "Enter the correct userid", + data = {"Test Case-Id": "5", + "Pre condition": "Enter the correct familyid", "Flow ": "Get", "App Name": "Lifeeazy", "Expected Output": "400", @@ -676,14 +502,14 @@ def test_example1(api_lifeeazy: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection1.insert_one(data) - if values in list1: - list1.remove(values) - print(len(list1)) - for j in list1: - print(j['url']) + collection2.insert_one(data) + # if values in list1: + # list1.remove(values) + # print(len(list1)) + # for j in list1: + # print(j['url']) except Exception as e: - data = {"Test Case-Id": "7", + data = {"Test Case-Id": "5", "Pre condition": "Give the correct url&data", "Flow ": "Get", "App Name": "Lifeeazy", @@ -700,15 +526,17 @@ def test_example1(api_lifeeazy: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection1.insert_one(data) - if values in list1: - list1.remove(values) - print(len(list1)) - for j in list1: - print(j['url']) + collection2.insert_one(data) + # if values in list1: + # list1.remove(values) + # print(len(list1),) + # for j in list1: + # print(j['url']) assert get_todo.ok -def test_example2(api_lifeeazy: APIRequestContext) -> None: + +@pytest.mark.Lifeeazy_test +def test_lifeeazyanthrobyuserid(api_lifeeazy: APIRequestContext) -> None: ac = list1 for values in ac: url = values['url'] @@ -721,14 +549,14 @@ def test_example2(api_lifeeazy: APIRequestContext) -> None: Project_Name = values['Project_Name'] Test = values['Test'] headers23 = {'Content-Type': 'application/json', 'Authorization': f"Bearer {headers}"} - if method == 'GET' and Test == 'Lablevelbyfamilyid Get': + if method == 'GET' and Test == 'Anthropometricsbyuserid Get': cleaned_string = url.replace("\u200B", "") get_todo = api_lifeeazy.get(url=str(cleaned_string), headers=headers23) try: test1 = get_todo.json() if test1['Status'] == 200: - data = {"Test Case-Id": "8", - "Pre condition": "Lablevel details of family member by using familyid", + data = {"Test Case-Id": "6", + "Pre condition": "Get the Anthropometric data based on UserId", "Flow ": "Get", "App Name": "Lifeeazy", "Expected Output": "200", @@ -744,15 +572,15 @@ def test_example2(api_lifeeazy: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection1.insert_one(data) - if values in list1: - list1.remove(values) - print(len(list1)) - for j in list1: - print(j['url']) + collection2.insert_one(data) + # if values in list1: + # list1.remove(values) + # print(len(list1)) + # for j in list1: + # print(j['url']) else: - data = {"Test Case-Id": "8", - "Pre condition": "Enter the correct familyid", + data = {"Test Case-Id": "6", + "Pre condition": "Enter the correct userid", "Flow ": "Get", "App Name": "Lifeeazy", "Expected Output": "400", @@ -768,14 +596,14 @@ def test_example2(api_lifeeazy: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection1.insert_one(data) - if values in list1: - list1.remove(values) - print(len(list1)) - for j in list1: - print(j['url']) + collection2.insert_one(data) + # if values in list1: + # list1.remove(values) + # print(len(list1)) + # for j in list1: + # print(j['url']) except Exception as e: - data = {"Test Case-Id": "8", + data = {"Test Case-Id": "6", "Pre condition": "Give the correct url&data", "Flow ": "Get", "App Name": "Lifeeazy", @@ -792,16 +620,18 @@ def test_example2(api_lifeeazy: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection1.insert_one(data) - if values in list1: - list1.remove(values) - print(len(list1)) - for j in list1: - print(j['url']) + collection2.insert_one(data) + # if values in list1: + # list1.remove(values) + # print(len(list1)) + # for j in list1: + # print(j['url']) assert get_todo.ok +@pytest.mark.IvinPro_test def test_ivinpost(api_ivin: APIRequestContext) -> None: ab = list2 + print(ab) for values in ab: url = values['url'] method = values['method'] @@ -813,7 +643,7 @@ def test_ivinpost(api_ivin: APIRequestContext) -> None: Project_Name = values['Project_Name'] Test = values['Test'] headers23 = {'Content-Type': 'application/json', 'Authorization': f"Bearer {headers}"} - if method == 'POST' and Test == 'Spost': + if method == 'POST' and Test == 'Socialmedia Post': cleaned_string = url.replace("\u200B", "") post_todo = api_ivin.post(url=str(cleaned_string), headers=headers23, data=payload) try: @@ -836,7 +666,7 @@ def test_ivinpost(api_ivin: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection2.insert_one(data) + collection1.insert_one(data) else: data = {"Test Case-Id": "1", "Pre condition": "Add the candidate profile for social media view", @@ -855,7 +685,7 @@ def test_ivinpost(api_ivin: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection2.insert_one(data) + collection1.insert_one(data) except Exception as e: data = {"Test Case-Id": "1", "Pre condition": "Give the correct url&data", @@ -874,9 +704,10 @@ def test_ivinpost(api_ivin: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection2.insert_one(data) + collection1.insert_one(data) assert post_todo.ok +@pytest.mark.IvinPro_test def test_ivinget(api_ivin: APIRequestContext) -> None: ab = list2 for values in ab: @@ -890,7 +721,7 @@ def test_ivinget(api_ivin: APIRequestContext) -> None: Project_Name = values['Project_Name'] Test = values['Test'] headers23 = {'Content-Type': 'application/json', 'Authorization': f"Bearer {headers}"} - if method == 'GET' and Test == 'Sgetall': + if method == 'GET' and Test == 'Getall Socialmedia': cleaned_string = url.replace("\u200B", "") get_todo = api_ivin.get(url=str(cleaned_string), headers=headers23) try: @@ -913,7 +744,7 @@ def test_ivinget(api_ivin: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection2.insert_one(data) + collection1.insert_one(data) else: data = {"Test Case-Id": "2", "Pre condition": "Enter the valid details", @@ -932,7 +763,7 @@ def test_ivinget(api_ivin: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection2.insert_one(data) + collection1.insert_one(data) except Exception as e: data = {"Test Case-Id": "2", "Pre condition": "Give the correct url&data", @@ -951,9 +782,10 @@ def test_ivinget(api_ivin: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection2.insert_one(data) + collection1.insert_one(data) assert get_todo.ok +@pytest.mark.IvinPro_test def test_ivinupdate(api_ivin: APIRequestContext) -> None: ab = list2 for values in ab: @@ -967,7 +799,7 @@ def test_ivinupdate(api_ivin: APIRequestContext) -> None: Project_Name = values['Project_Name'] Test = values['Test'] headers23 = {'Content-Type': 'application/json', 'Authorization': f"Bearer {headers}"} - if method == 'PUT' and Test == 'Sput': + if method == 'PUT' and Test == 'Socialmedia Put': cleaned_string = url.replace("\u200B", "") put_todo = api_ivin.put(url=str(cleaned_string), headers=headers23, data=payload) try: @@ -990,7 +822,7 @@ def test_ivinupdate(api_ivin: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection2.insert_one(data) + collection1.insert_one(data) else: data = {"Test Case-Id": "3", "Pre condition": "Enter the valid details", @@ -1009,7 +841,7 @@ def test_ivinupdate(api_ivin: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection2.insert_one(data) + collection1.insert_one(data) except Exception as e: data = {"Test Case-Id": "3", "Pre condition": "Give the correct url&data", @@ -1028,9 +860,10 @@ def test_ivinupdate(api_ivin: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection2.insert_one(data) + collection1.insert_one(data) assert put_todo.ok +@pytest.mark.IvinPro_test def test_ivindelete(api_ivin: APIRequestContext) -> None: ab = list2 for values in ab: @@ -1044,7 +877,7 @@ def test_ivindelete(api_ivin: APIRequestContext) -> None: Project_Name = values['Project_Name'] Test = values['Test'] headers23 = {'Content-Type': 'application/json', 'Authorization': f"Bearer {headers}"} - if method == 'DELETE' and Test == 'Sdelete': + if method == 'DELETE' and Test == 'Socialmedia Delete': cleaned_string = url.replace("\u200B", "") delete_todo = api_ivin.delete(url=str(cleaned_string), headers=headers23, data=payload) try: @@ -1067,7 +900,7 @@ def test_ivindelete(api_ivin: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection2.insert_one(data) + collection1.insert_one(data) else: data = {"Test Case-Id": "4", "Pre condition": "Enter the valid id", @@ -1086,7 +919,7 @@ def test_ivindelete(api_ivin: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection2.insert_one(data) + collection1.insert_one(data) except Exception as e: data = {"Test Case-Id": "4", "Pre condition": "Give the correct url&data", @@ -1105,10 +938,11 @@ def test_ivindelete(api_ivin: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection2.insert_one(data) + collection1.insert_one(data) assert delete_todo.ok -def test_ivingetall(api_ivin: APIRequestContext) -> None: +@pytest.mark.IvinPro_test +def test_ivingetallstates(api_ivin: APIRequestContext) -> None: ab = list2 for values in ab: url = values['url'] @@ -1121,7 +955,7 @@ def test_ivingetall(api_ivin: APIRequestContext) -> None: Project_Name = values['Project_Name'] Test = values['Test'] headers23 = {'Content-Type': 'application/json', 'Authorization': f"Bearer {headers}"} - if method == 'GET' and Test == 'Getall StateNames': + if method == 'GET' and Test == 'UserIvin Getall StateNames': cleaned_string = url.replace("\u200B", "") get_todo = api_ivin.get(url=str(cleaned_string), headers=headers23) try: @@ -1144,7 +978,7 @@ def test_ivingetall(api_ivin: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection2.insert_one(data) + collection1.insert_one(data) else: data = {"Test Case-Id": "5", "Pre condition": "Enter the valid details", @@ -1163,7 +997,7 @@ def test_ivingetall(api_ivin: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection2.insert_one(data) + collection1.insert_one(data) except Exception as e: data = {"Test Case-Id": "5", "Pre condition": "Give the correct url&data", @@ -1182,10 +1016,11 @@ def test_ivingetall(api_ivin: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection2.insert_one(data) + collection1.insert_one(data) assert get_todo.ok -def test_ivingetall1(api_ivin: APIRequestContext) -> None: +@pytest.mark.IvinPro_test +def test_ivingetallworkers(api_ivin: APIRequestContext) -> None: ab = list2 for values in ab: url = values['url'] @@ -1198,7 +1033,7 @@ def test_ivingetall1(api_ivin: APIRequestContext) -> None: Project_Name = values['Project_Name'] Test = values['Test'] headers23 = {'Content-Type': 'application/json', 'Authorization': f"Bearer {headers}"} - if method == 'GET' and Test == 'Getall Workers': + if method == 'GET' and Test == 'UserIvin Getall Workers': cleaned_string = url.replace("\u200B", "") get_todo = api_ivin.get(url=str(cleaned_string), headers=headers23) try: @@ -1221,7 +1056,7 @@ def test_ivingetall1(api_ivin: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection2.insert_one(data) + collection1.insert_one(data) else: data = {"Test Case-Id": "6", "Pre condition": "Enter the valid details", @@ -1240,7 +1075,7 @@ def test_ivingetall1(api_ivin: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection2.insert_one(data) + collection1.insert_one(data) except Exception as e: data = {"Test Case-Id": "6", "Pre condition": "Give the correct url&data", @@ -1259,5 +1094,5 @@ def test_ivingetall1(api_ivin: APIRequestContext) -> None: 'Environment Name': EnvironmentName, 'TestCase Version': Testcase_Version, 'Project Name': Project_Name} - collection2.insert_one(data) + collection1.insert_one(data) assert get_todo.ok diff --git a/POC/poc_automation/testcases_Ivin.xlsx b/POC/poc_automation/testcases_Ivin.xlsx index 213fa4cf612a71845e7a9a67b606b1602a3681ba..b5a2d0885e2e2300d57da7f720b82133989eb706 100644 GIT binary patch delta 2772 zcmY+GX*3iJ7stnpL>Pl1GWK=SLu1d_*F>QRVXP4i60*G-%b2lc8#^Hydzh5$dz7un zPK+2mma&HHulM=zbl&^vo^${Ae?Q!F{^z%Ux7Vzin-#pr+v@?O0RR+10Dv%nz#}e- z8A<+f3xt4lZ-j3^mS&G9%dBtJG+Vy9DE)w6V0~~Mw|+;9jTjQV@XFCp6B`}?b6MIC z=~s-Uc)})-xJSHhCN@CrGFzw8Z<}ueGx|e6I+q|Kgh#4-==)X<-M6q227&OsG5s_+ zRQ?zIpdLb6_m)dSCZr(WFcuorGrh!Y7R_dXbpF2mjcoCBgLy)ln=!DBg&Gr}c zcx`QWutn>Oo6B+7zh&V}X|>$$TKHwg^4@UCz`kNpi?SR;?~DN7+njb(HaZzl)Q(gv zX8!I;bYEsltLo1I(HDpI@Z$YAIHf8cZ!iBu>P}Gc`yW+lYOx)+GjSZ+sp*bf?<ajrS^&`&Oo@=y^=_*xB3T-SmTccht17(@X^Y!^X{oobj6LXn*}@nBJ-UGAjmS zu(?mK(lHv&D?_d2@<)moTjTRyKI8SXrW59Yo2;EG>+ zL!K+!!BM33!6!F$c5Tf8jAzaFq}H~Y@9k-$z8vK8Up|#!7Bi5!Vmz$#`^cFq0M@U9?p^je+?IlBe*$o&8@~ zJpJ^9S~e_kb67%550BSVS=VaY9X^!HCtyXE^6`!uoS!_S(0`lVJ}ahAydpzuBQ2=c z9woNCxTBr<3_%WxMzpUpGh^FmEpEugi%+rmgRxi7oWXOhD%OM9D{Jj4kbv*6c2jn4TD^TgQ^$Uek4KY1MmEY9j%}&AWUCGZQS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Tw^B-&Tbb)S9-SltsT5I>m zxu&4V(d-{&w`qPjl0N)`be>q!9CKI`2WD46_Dv+on9;KsVb&`*b<0d>#p?zl6MnJk zH;ggSxqFkv{Ug<$WBK>uA8AQTWqe`m7u9?mF9l}9DGxxrW2)73`lhg`t?w6A!aF8- zrWG@9d(&dmo12G@1Ul)CRjg-Xv8f(bekk>}&Es-$$ri&|A8yU)k&hCQg#(l1n2I9< zviTLsy`vg87RJK^xFEGkTH0&8l*__LD&8U>K=41HMj4SKu2m%0Nhd}qw89DM_=@=3!@psU00{}<SLjMw1o}jQ!X|gF$j>#jqzRUi8`wzSi-0%PZ diff --git a/POC/poc_automation/urls.py b/POC/poc_automation/urls.py index 9176f26..8db9c20 100644 --- a/POC/poc_automation/urls.py +++ b/POC/poc_automation/urls.py @@ -4,16 +4,16 @@ # from .test_excel import objects urlpatterns = [ - path('post/', IvinExcelUpload.as_view(), name='ivin upload'), - path('getall/', Ivingetall.as_view(), name='getall ivin details'), - path('project/', IvinProjectname.as_view(), name='project-name'), - path('projectname/', IvinProject.as_view(), name='projectname'), + path('upload/', IvinExcelUpload.as_view(), name='ivin upload'), + path('getalldetails/', Ivingetall.as_view(), name='getall ivin details'), + path('projectname/', IvinProjectname.as_view(), name='project-name'), + path('project/', IvinProject.as_view(), name='projectname'), path('put/', IvinUpdate.as_view(), name='update'), path('delete/', IvinDelete.as_view(), name='delete'), - path('lifepost/', lifeeazyExcelUpload.as_view(), name='lifeeazy-data'), - path('lifegetall/', lifeeazygetall.as_view(), name='lifeeazy-getall'), - path('lifeget/', lifeeazyProjectname.as_view(), name='lifeeazy-projectname'), - path('lifegetproject/', lifeeazygetproject.as_view(), name='projectname'), + path('post/', lifeeazyExcelUpload.as_view(), name='lifeeazy-data'), + path('getall/', lifeeazygetall.as_view(), name='lifeeazy-getall'), + path('pname/', lifeeazyProjectname.as_view(), name='lifeeazy-projectname'), + path('getprojectname/', lifeeazygetproject.as_view(), name='projectname'), # path('object//',objects.as_view()) ] diff --git a/POC/poc_automation/views.py b/POC/poc_automation/views.py index 75d2c3d..e320804 100644 --- a/POC/poc_automation/views.py +++ b/POC/poc_automation/views.py @@ -1,24 +1,24 @@ from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import generics -from .serializers import MyModelSerializer,MydataSerializer, ProjectSerializer, lifeSerializer, lifeeazySerializer +from .serializers import * from rest_framework.generics import GenericAPIView import pandas as pd from .models import * class IvinExcelUpload(GenericAPIView): - serializer_class = MyModelSerializer + serializer_class = IvinSerializer def post(self, request): df = pd.read_excel(r'F:\poc-automatica\POC\poc_automation\testcases_Ivin.xlsx') rows = df.to_dict(orient='records') - serializer = MyModelSerializer(data=rows, many=True) + serializer = IvinSerializer(data=rows, many=True) if serializer.is_valid(): serializer.save() - return Response("Data uploaded successfully") + return Response("IvinPro Upload Successfully") else: return Response(serializer.errors, status=400) @@ -26,21 +26,20 @@ def post(self, request): class Ivingetall(APIView): def get(self, request): queryset = InputModel.objects.all() - serializer = MyModelSerializer(queryset, many=True) + serializer = IvinSerializer(queryset, many=True) return Response(serializer.data) class IvinProjectname(generics.GenericAPIView): - queryset = MydataSerializer - + queryset = IvinProjectSerializer def get(self, request, Project_Name): project_name = InputModel.objects.filter(Project_Name=Project_Name) - serializer = MydataSerializer(project_name,many=True) + serializer = IvinProjectSerializer(project_name,many=True) return Response(serializer.data) class IvinProject(generics.GenericAPIView): - serializer_class = ProjectSerializer + serializer_class = IvinProjectSerializer def post(self, request): projectname = request.data.get("Project_Name") # print(projectname) @@ -49,7 +48,7 @@ def post(self, request): class IvinUpdate(generics.GenericAPIView): - serializer_class = ProjectSerializer + serializer_class = IvinProjectSerializer def put(self, request, pk): try: instance = InputModel.objects.get(pk=pk) @@ -61,7 +60,7 @@ def put(self, request, pk): return Response("Record updated successfully") class IvinDelete(generics.GenericAPIView): - serializer_class = ProjectSerializer + serializer_class = IvinProjectSerializer def delete(self, request, pk): try: instance = InputModel.objects.get(pk=pk) @@ -73,16 +72,16 @@ def delete(self, request, pk): class lifeeazyExcelUpload(GenericAPIView): - serializer_class = lifeSerializer + serializer_class = lifeeazySerializer def post(self, request): df = pd.read_excel(r'F:\poc-automatica\POC\poc_automation\testcases_lifeeazy.xlsx') rows = df.to_dict(orient='records') - serializer = lifeSerializer(data=rows, many=True) + serializer = lifeeazySerializer(data=rows, many=True) if serializer.is_valid(): serializer.save() - return Response("Upload successful") + return Response("Lifeeazy Upload Successfully") else: return Response(serializer.errors, status=400) @@ -90,21 +89,21 @@ def post(self, request): class lifeeazygetall(APIView): def get(self, request): - queryset = lifeeazyModel.object.all() - serializer_class = lifeSerializer(queryset, many=True)# Add the queryset attribute here + queryset = lifeeazyModel.objects.all() + serializer_class = lifeeazySerializer(queryset, many=True)# Add the queryset attribute here return Response(serializer_class.data) class lifeeazyProjectname(generics.GenericAPIView): - queryset = lifeSerializer + queryset = lifeeazyProjectSerializer def get(self, request, Project_Name): - project_name = lifeeazyModel.object.filter(Project_Name=Project_Name) - serializer = lifeSerializer(project_name,many=True) + project_name = lifeeazyModel.objects.filter(Project_Name=Project_Name) + serializer = lifeeazyProjectSerializer(project_name,many=True) return Response(serializer.data) class lifeeazygetproject(generics.GenericAPIView): - serializer_class = lifeeazySerializer + serializer_class = lifeeazyProjectSerializer def post(self, request): projectname = request.data.get("Project_Name") # print(projectname) @@ -112,3 +111,24 @@ def post(self, request): return Response('Done lifeeazy') +class lifeeazyUpdate(generics.GenericAPIView): + serializer_class = lifeeazySerializer + def put(self, request, pk): + try: + instance = lifeeazyModel.objects.get(pk=pk) + except lifeeazyModel.DoesNotExist: + return Response("Record not found", status=404) + serializer = self.get_serializer(instance, data=request.data, partial=True) + serializer.is_valid(raise_exception=True) + serializer.save() + return Response("Update the records") + +class lifeeazyDelete(generics.GenericAPIView): + serializer_class = lifeeazySerializer + def delete(self, request, pk): + try: + instance = lifeeazyModel.objects.get(pk=pk) + except lifeeazyModel.DoesNotExist: + return Response("Record not found", status=404) + instance.delete() + return Response("Record deleted successfully") diff --git a/README.md b/README.md index fd93c04..46810a4 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,9 @@ -

Multiple TestCases for Multiple Products

+

Multiple TestCases for Multiple Products/Projects: using Fixtures

-Python-based API testing and automation tool that allows testers and developers to efficiently organize, execute, and manage test cases for multiple projects or products. The project utilizes Django as the web framework and MongoDB as the backend database for seamless data storage. -It offers a user-friendly interface for grouping API collections by product (e.g.,Lifeeazy and IvinPro) and uploading test cases for each product.The tool automates the execution of test cases, captures the data, and stores the results in MongoDB. - +Python-based API testing and automation tool that allows testers and developers to efficiently organize, execute, and manage test cases for multiple projects or products. The project utilizes Django as the web framework and MongoDB as the backend database for seamless data storage, this tool offers a user-friendly interface that enables testers and developers to effectively group API collections by specific products, such as "Lifeeazy" and "IvinPro." Users can also uploading testcases for each product.The ability to run a single project file, allowing testers to focus on either "Lifeeazy" or "IvinPro" testing. As tests are executed, The tool automates the execution of test cases, captures the data, and stores the results in MongoDB. # Prerequisites: @@ -19,8 +17,8 @@ It offers a user-friendly interface for grouping API collections by product (e.g * Install necessary dependencies: pip install pytest - pip install playwright pip install requests + pip install pymongo # Setup your project: @@ -58,7 +56,7 @@ It offers a user-friendly interface for grouping API collections by product (e.g * Use a library like pandas to parse the Excel file and extract the relevant information. -* Accept test case data in a standardized format, including API endpoints, request payloads, and expected responses, etc. +* Accept test case data in a standardized format, including API endpoints, request payloads, and expected responses, status, status_code, version, etc. * To run the command in the Terminal: @@ -72,24 +70,71 @@ It offers a user-friendly interface for grouping API collections by product (e.g * For example, save the Lifeeazy test cases to the "lifeeazy_test_cases" collection and the IvinPro test cases to the "ivinpro_test_cases" collection. +# Define Custom Markers: + +* In the conftest.py file, define the custom markers using the pytest_configure hook. This hook is automatically called by pytest during configuration. + +* Custom markers help you categorize the test cases based on different criteria, in this case, based on the product being tested. + +* In this case, we will define markers for Lifeeazy_test and IvinPro_test. + +* For Example: + + conftest.py + + import pytest + + def pytest_configure(config): + config.addinivalue_line("markers", "IvinPro_test: Marker for test cases related to Lifeeazy product.") + config.addinivalue_line("markers", "Lifeeazy_test: Marker for test cases related to Ivin_Pro product.") + # Writing Playwright Test Cases: * Once the data is saved in MongoDB, you might perform API testing. -* Utilize Playwright to write test cases for each product's APIs separately (e.g., Lifeeazy and IVINPro). +* Utilize Playwright to write test cases for each product's(e.g., Lifeeazy and IvinPro), and write individual test functions and use the appropriate custom marker to tag each test function with the corresponding product. + +* Inside each test function, use Playwright APIs to send requests (e.g., GET, POST, PUT, DELETE) to the API endpoints and capture the responses. + +* Implement assertions to validate the responses and perform checks to ensure the API behaves as expected. - - Send a specific request to the endpoint (e.g., GET, POST, PUT, DELETE) with the necessary parameters. - - Capture and validate the response received from the API endpoint. +# Fixture Setup: -* Ensure that each Playwright test case corresponds to a specific API endpoint and captures the relevant response data. +* After writing the test cases and define a fixture in conftest.py to set up the Playwright instance. -# Test Case Execution: +* Define a fixture in conftest.py to set up the Playwright instance and the page instance to be used in each test function. + +* Fixtures are functions that provide reusable setup and teardown logic for your tests. + +* In this case, the playwright fixture sets up the Playwright instance, and the page fixture creates a new page for each test function. + +* For Example: + + import pytest + from playwright.sync_api import APIRequestContext, Playwright + from typing import Generator + + @pytest.mark.Lifeeazy_test + def test_lifeeazyget(api_lifeeazy: APIRequestContext) -> None: + if method == 'GET' and Test == 'Allergies Get': + get_todo = api_lifeeazy.get(url=str("Your-url"), headers="Your-Token") + assert get_todo.ok + + +# Test Case Execution: + +* After setting up the test cases, you can run only one product(Lifeeazy or IvinPro) following the command: + + pytest --template=html1/index.html --report=report.html -k Lifeeazy_test + OR -* Execute the Playwright test cases for both "Lifeeazy" and "Ivinpro" APIs. + pytest --template=html1/index.html --report=report.html -k IvinPro_test + +* Execute the test cases for both "Lifeeazy" and "Ivinpro" APIs. * To run this script, need to be in directory and run the following command : - pytest --template=html1/index.html --report=report.html + pytest --template=html1/index.html --report=report.html # Saving Test Results to MongoDB: