Produced by Araxis Merge on 3/25/2019 8:58:09 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
# | Location | File | Last Modified |
---|---|---|---|
1 | C:\AraxisMergeCompare\Pri_un\IMAG_VIX\common\ZFViewerServices\ViewerRender-2.2.6968.19079\Scripts | VixCheck.ps1 | Tue Jan 29 15:43:32 2019 UTC |
2 | C:\AraxisMergeCompare\Pri_re\IMAG_VIX\common\ZFViewerServices\ViewerRender-2.2.6968.19079\Scripts | VixCheck.ps1 | Tue Mar 19 15:37:00 2019 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 4 | 242 |
Changed | 3 | 6 |
Inserted | 0 | 0 |
Removed | 0 | 0 |
Whitespace | |
---|---|
Character case | Differences in character case are significant |
Line endings | Differences in line endings (CR and LF characters) are ignored |
CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
1 | # | |
2 | # VixCheck .ps1 | |
3 | # | |
4 | Param ( | |
5 | [P arameter(M andatory=$ False, Hel pMessage=" Enter test environme nt.")] | |
6 | [a lias("te") ] | |
7 | [s tring] $te stEnv = "p anorama" | |
8 | ) | |
9 | ||
10 | $msgColor = "Magenta " | |
11 | ||
12 | $testDataP rops = @{} | |
13 | $sessionVa rs = New-O bject PSOb ject | |
14 | $sessionVa rs | Add-M ember Note Property V ixSecurity Token "" | |
15 | ||
16 | switch ($t estEnv) | |
17 | { | |
18 | "d efault" | |
19 | { | |
20 | $testDataP rops.URL = "http://l ocalhost: PORT " | |
21 | $tes tDataProps .AccessCod e = "boati ng1" | |
22 | $tes tDataProps .VerifyCod e = "boati ng1." | |
23 | } | |
24 | ||
25 | "p anorama" | |
26 | { | |
27 | $testDataP rops.URL = "http://p vix. DNS .us: PORT " | |
28 | $tes tDataProps .AccessCod e = "boati ng1" | |
29 | $tes tDataProps .VerifyCod e = "boati ng1." | |
30 | $t estDataPro ps.Expecte dTokenLeng th = 152 | |
31 | } | |
32 | ||
33 | ||
34 | "k odak" | |
35 | { | |
36 | $testDataP rops.URL = "http://k vix. DNS .us: PORT " | |
37 | $tes tDataProps .AccessCod e = "boati ng1" | |
38 | $tes tDataProps .VerifyCod e = "boati ng1." | |
39 | } | |
40 | } | |
41 | ||
42 | $testData = New-Obje ct –TypeNa me PSObjec t –Prop $t estDataPro ps | |
43 | Write-Host $testData | |
44 | ||
45 | function T est-GetVix SecurityTo ken | |
46 | { | |
47 | Wr ite-Host ( "Running.. ." + $MyIn vocation.M yCommand) | |
48 | ||
49 | # prep are authen tication s tring | |
50 | $p air = $tes tDataProps .AccessCod e + ":" + $testDataP rops.Verif yCode | |
51 | $b ytes = [Sy stem.Text. Encoding]: :ASCII.Get Bytes($pai r) | |
52 | $b ase64 = [S ystem.Conv ert]::ToBa se64String ($bytes) | |
53 | $b asicAuthVa lue = "Bas ic $base64 " | |
54 | $h eaders = @ { Authoriz ation = $b asicAuthVa lue } | |
55 | Wr ite-Host $ headers | |
56 | ||
57 | # invo ke request | |
58 | $url = $testData Props.URL + "/Viewer StudyWebAp p/restserv ices/study /user/toke n" | |
59 | $r esponse = Invoke-Web Request $u rl -Header s $headers -Verbose | |
60 | Wr ite-Host $ response | |
61 | ||
62 | # pars e response | |
63 | $xml = [xml]$res ponse | |
64 | $token = $xml.re stStringTy pe.value | |
65 | Write- Host "Toke n: " $toke n | |
66 | ||
67 | # chec k if strin g greater than 10 | |
68 | if ($t oken.lengt h -ne $tes tDataProps .ExpectedT okenLength ) | |
69 | { | |
70 | th row "Inval id token r eceived" | |
71 | } | |
72 | ||
73 | $s essionVars .VixSecuri tyToken = $token | |
74 | } | |
75 | ||
76 | function T est-GetUse rCredentia lsBare | |
77 | { | |
78 | Wr ite-Host ( "Running.. ." + $MyIn vocation.M yCommand) | |
79 | ||
80 | # prep are authen tication s tring | |
81 | $p air = $tes tDataProps .AccessCod e + ":" + $testDataP rops.Verif yCode | |
82 | $b ytes = [Sy stem.Text. Encoding]: :ASCII.Get Bytes($pai r) | |
83 | $b ase64 = [S ystem.Conv ert]::ToBa se64String ($bytes) | |
84 | $b asicAuthVa lue = "Bas ic $base64 " | |
85 | $h eaders = @ { Authoriz ation = $b asicAuthVa lue } | |
86 | Wr ite-Host $ headers | |
87 | ||
88 | # invo ke request | |
89 | $url = $testData Props.URL + "/Viewer ImagingWeb App/token/ restservic es/viewerI maging/get UserInform ation?secu rityToken" | |
90 | $r esponse = Invoke-Web Request $u rl -Header s $headers -Verbose | |
91 | Wr ite-Host $ response | |
92 | ||
93 | # pars e response | |
94 | $xml = [xml]$res ponse | |
95 | $token = $xml.re stStringTy pe.value | |
96 | Write- Host "Toke n: " $toke n | |
97 | ||
98 | # chec k if strin g greater than 10 | |
99 | if ($t oken.lengt h -ne $tes tDataProps .ExpectedT okenLength ) | |
100 | { | |
101 | th row "Inval id token r eceived" | |
102 | } | |
103 | ||
104 | $s essionVars .VixSecuri tyToken = $token | |
105 | } | |
106 | ||
107 | ||
108 | function T est-All | |
109 | { | |
110 | try | |
111 | { | |
112 | Te st-GetVixS ecurityTok en | |
113 | Te st-GetUser Credential sBare | |
114 | ||
115 | } | |
116 | catch | |
117 | { | |
118 | Wr ite-Host $ _.Exceptio n | |
119 | } | |
120 | ||
121 | } | |
122 | ||
123 | ||
124 | Test-All |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.