├── .gitignore
├── Binaries .NET 3.5
├── Abstracta.FiddlerSessionComparer_3.5.dll
├── Abstracta.GXtest.Utils.dll
├── Abstracta.Generator_3.5.dll
├── Abstracta.ScriptGeneratorGUI_3.5.exe
├── FiddlerCore.dll
├── Ionic.Zip.dll
├── Newtonsoft.Json.dll
└── Simplicit.Net.Lzo.dll
├── Binaries .NET 4.5
├── Abstracta.FiddlerSessionComparer_4.5.dll
├── Abstracta.GXtest.Utils.dll
├── Abstracta.Generator_4.5.dll
├── Abstracta.ScriptGeneratorCLI_4.5.exe
├── Abstracta.ScriptGeneratorGUI_4.5.exe
├── FiddlerCore.dll
├── Ionic.Zip.dll
├── ManyConsole.dll
├── NDesk.Options.dll
├── Newtonsoft.Json.dll
└── Simplicit.Net.Lzo.dll
├── Examples
└── duckduckgo
│ ├── AutoGeneratedScriptName.jmx
│ ├── ProcessingResult.txt
│ └── sessions.saz
├── FiddlerSessionComparerCLI_3.5
├── FiddlerSessionComparerCLI_3.5.csproj
├── Properties
│ └── AssemblyInfo.cs
└── app.config
├── FiddlerSessionComparerCLI_4.5
├── FiddlerSessionComparerCLI_4.5.csproj
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
└── app.config
├── FiddlerSessionComparerGUI_4.5
├── App.config
├── App.xaml
├── App.xaml.cs
├── FiddlerSessionComparerGUI_4.5.csproj
├── MainWindow.xaml
├── MainWindow.xaml.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
└── Readme.txt
├── FiddlerSessionComparerTests_4.5
├── FiddlerSessionComparerTests_4.5.csproj
├── JSONParse.cs
├── Properties
│ └── AssemblyInfo.cs
└── XMLParse.cs
├── FiddlerSessionComparer_3.5
├── Content
│ └── Tuple.cs
├── FiddlerSessionComparer_3.5.csproj
├── Properties
│ └── AssemblyInfo.cs
├── Utils
│ └── EmptyFile.txt
└── app.config
├── FiddlerSessionComparer_4.5
├── ComparerResultType.cs
├── Content
│ ├── ContentFactory.cs
│ └── XmlContentType.cs
├── EqualsResult.cs
├── FiddlerSessionComparer.cs
├── FiddlerSessionComparer_4.5.csproj
├── Page.cs
├── Parameter.cs
├── ParameterDefinition.cs
├── Properties
│ └── AssemblyInfo.cs
├── RegExpExtractor.cs
├── Replacement.cs
├── Utils
│ ├── FiddlerSessionExtension.cs
│ ├── Logger.cs
│ ├── NameFactory.cs
│ ├── SAZ-DOTNETZIP.cs
│ ├── SessionUtils.cs
│ └── StringUtils.cs
└── app.config
├── GeneratorFramework_3.5
├── AbstractGenerator
│ ├── Extensions
│ │ └── EmptyFile.txt
│ ├── ParameterExtractor
│ │ └── EmptyFile.txt
│ ├── Validations
│ │ └── EmptyFile.txt
│ ├── Wrapper
│ │ └── EmptyFile.txt
│ └── Wrappers
│ │ └── EmptyFile.txt
├── Constants
│ └── EmptyFile.txt
├── GeneratorFramework_3.5.csproj
├── JMeterGenerator
│ ├── AuxiliarClasses
│ │ └── EmptyFile.txt
│ ├── ParameterExtractor
│ │ └── EmptyFile.txt
│ └── Validations
│ │ └── EmptyFile.txt
├── OSTAGenerator
│ ├── AuxiliarClasses
│ │ ├── SCLSnippets
│ │ │ └── EmptyFile.txt
│ │ └── Scripts
│ │ │ └── EmptyFile.txt
│ ├── ParameterExtractor
│ │ └── EmptyFile.txt
│ └── Validations
│ │ └── EmptyFile.txt
├── Properties
│ └── AssemblyInfo.cs
└── TestingGenerator
│ └── ParameterExtractor
│ └── EmptyFile.txt
├── GeneratorFramework_4.5
├── AbstractGenerator
│ ├── AbstractFollowRedirect.cs
│ ├── AbstractGenerator.cs
│ ├── AbstractPageRequest.cs
│ ├── AbstractStep.cs
│ ├── Command.cs
│ ├── DataPool.cs
│ ├── HTTPRequest.cs
│ ├── ParameterExtractor
│ │ ├── AbstractParameterExtractor.cs
│ │ ├── AbstractRegExParameter.cs
│ │ └── NameGenerator.cs
│ ├── ParametersType.cs
│ ├── Validations
│ │ ├── AbstractValidation.cs
│ │ ├── AppearTextValidation.cs
│ │ ├── CheckMainObjectValidation.cs
│ │ ├── DefaultValidation.cs
│ │ └── ResponseCodeValidation.cs
│ └── Wrappers
│ │ ├── FiddlerSessionsWrapper.cs
│ │ └── GXTestScriptWrapper.cs
├── Constants
│ └── HTTPConstants.cs
├── GeneratorFramework_4.5.csproj
├── JMeterGenerator
│ ├── AuxiliarClasses
│ │ ├── CommonArgumentTypes.cs
│ │ ├── CommonCollectorTypes.cs
│ │ ├── JMeterWrapper.cs
│ │ └── ThinktimeType.cs
│ ├── JMeterGenerator.cs
│ ├── PageRequest.cs
│ ├── ParameterExtractor
│ │ ├── JMeterConstant.cs
│ │ └── JMeterRegExParameter.cs
│ ├── Step.cs
│ └── Validations
│ │ ├── AppearTextValidation.cs
│ │ ├── CheckMainObjectValidation.cs
│ │ ├── DefaultValidation.cs
│ │ ├── ResponseCodeValidation.cs
│ │ └── ValidationHelper.cs
├── Logger.cs
├── OSTAGenerator
│ ├── AuxiliarClasses
│ │ ├── DataFile.cs
│ │ ├── DataFileColumn.cs
│ │ ├── OpenSTAUtils.cs
│ │ ├── ParametrizedValue.cs
│ │ ├── Repository.cs
│ │ ├── SCLSnippets
│ │ │ ├── AppearTextSection.cs
│ │ │ ├── BuildBlobFromBlobSection.cs
│ │ │ ├── BuildBlobFromUserSection.cs
│ │ │ ├── CodeSection.cs
│ │ │ ├── Comment.cs
│ │ │ ├── ConstantDeclarationSection.cs
│ │ │ ├── EndTimer.cs
│ │ │ ├── EnviromentSection.cs
│ │ │ ├── HeaderSection.cs
│ │ │ ├── ISCLSections.cs
│ │ │ ├── IncludeSecondaryScript.cs
│ │ │ ├── IncludedScriptSection.cs
│ │ │ ├── LoadCookieSection.cs
│ │ │ ├── LogResponsesSection.cs
│ │ │ ├── PlainCode.cs
│ │ │ ├── RequestSection.cs
│ │ │ ├── StartTimer.cs
│ │ │ ├── ThinkTimeSection.cs
│ │ │ └── VariableDeclaration.cs
│ │ ├── Scripts
│ │ │ ├── IScript.cs
│ │ │ ├── IncludedScriptSCL.cs
│ │ │ ├── MainScriptSCL.cs
│ │ │ ├── ScriptInc.cs
│ │ │ └── ScriptSCL.cs
│ │ ├── SessionUtils.cs
│ │ ├── Variable.cs
│ │ └── VariablesScopes.cs
│ ├── OpenSTAGenerator.cs
│ ├── PageRequest.cs
│ ├── ParameterExtractor
│ │ └── OSTARegExParameter.cs
│ ├── Step.cs
│ └── Validations
│ │ ├── AppearTextValidation.cs
│ │ ├── CheckMainObjectValidation.cs
│ │ ├── DefaultValidation.cs
│ │ └── ResponseCodeValidation.cs
├── Properties
│ └── AssemblyInfo.cs
├── Readme.txt
├── ScriptGenerator.cs
└── TestingGenerator
│ ├── PageRequest.cs
│ ├── ParameterExtractor
│ └── TestRegExParameter.cs
│ ├── Step.cs
│ └── TestingGenerator.cs
├── Generators.sln
├── README.md
├── ScriptGeneratorCLI_4.5
├── App.config
├── Command.cs
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
├── ScriptGeneratorCLI_4.5.csproj
└── packages.config
├── ScriptGeneratorGUI_3.5
├── App.xaml
├── App.xaml.cs
├── MainWindow.xaml
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
└── ScriptGeneratorGUI_3.5.csproj
├── ScriptGeneratorGUI_4.5
├── App.xaml
├── App.xaml.cs
├── MainWindow.xaml
├── MainWindow.xaml.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── ScriptGeneratorGUI_4.5.csproj
└── app.config
├── clear.bat
├── copyLastVersion.bat
└── dependencies
├── .NET_3.5
├── FiddlerCore.dll
└── Newtonsoft.Json.dll
├── .NET_4.5
├── FiddlerCore.dll
└── Newtonsoft.Json.dll
├── Abstracta.GXtest.Utils.dll
├── ICSharpCode.SharpZipLib.dll
├── Ionic.Zip.dll
└── Simplicit.Net.Lzo.dll
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.sln.docstates
8 |
9 | # Build results
10 | [Dd]ebug/
11 | [Dd]ebugPublic/
12 | [Rr]elease/
13 | x64/
14 | build/
15 | bld/
16 | [Bb]in/
17 | [Oo]bj/
18 |
19 | # MSTest test Results
20 | [Tt]est[Rr]esult*/
21 | [Bb]uild[Ll]og.*
22 |
23 | #NUNIT
24 | *.VisualState.xml
25 | TestResult.xml
26 |
27 | # Build Results of an ATL Project
28 | [Dd]ebugPS/
29 | [Rr]eleasePS/
30 | dlldata.c
31 |
32 | *_i.c
33 | *_p.c
34 | *_i.h
35 | *.ilk
36 | *.meta
37 | *.obj
38 | *.pch
39 | *.pdb
40 | *.pgc
41 | *.pgd
42 | *.rsp
43 | *.sbr
44 | *.tlb
45 | *.tli
46 | *.tlh
47 | *.tmp
48 | *.tmp_proj
49 | *.log
50 | *.vspscc
51 | *.vssscc
52 | .builds
53 | *.pidb
54 | *.svclog
55 | *.scc
56 |
57 | # Chutzpah Test files
58 | _Chutzpah*
59 |
60 | # Visual C++ cache files
61 | ipch/
62 | *.aps
63 | *.ncb
64 | *.opensdf
65 | *.sdf
66 | *.cachefile
67 |
68 | # Visual Studio profiler
69 | *.psess
70 | *.vsp
71 | *.vspx
72 |
73 | # TFS 2012 Local Workspace
74 | $tf/
75 |
76 | # Guidance Automation Toolkit
77 | *.gpState
78 |
79 | # ReSharper is a .NET coding add-in
80 | _ReSharper*/
81 | *.[Rr]e[Ss]harper
82 | *.DotSettings.user
83 |
84 | # JustCode is a .NET coding addin-in
85 | .JustCode
86 |
87 | # TeamCity is a build add-in
88 | _TeamCity*
89 |
90 | # DotCover is a Code Coverage Tool
91 | *.dotCover
92 |
93 | # NCrunch
94 | *.ncrunch*
95 | _NCrunch_*
96 | .*crunch*.local.xml
97 |
98 | # MightyMoose
99 | *.mm.*
100 | AutoTest.Net/
101 |
102 | # Web workbench (sass)
103 | .sass-cache/
104 |
105 | # Installshield output folder
106 | [Ee]xpress/
107 |
108 | # DocProject is a documentation generator add-in
109 | DocProject/buildhelp/
110 | DocProject/Help/*.HxT
111 | DocProject/Help/*.HxC
112 | DocProject/Help/*.hhc
113 | DocProject/Help/*.hhk
114 | DocProject/Help/*.hhp
115 | DocProject/Help/Html2
116 | DocProject/Help/html
117 |
118 | # Click-Once directory
119 | publish/
120 |
121 | # Publish Web Output
122 | *.[Pp]ublish.xml
123 | *.azurePubxml
124 |
125 | # NuGet Packages Directory
126 | packages/
127 | ## TODO: If the tool you use requires repositories.config uncomment the next line
128 | #!packages/repositories.config
129 |
130 | # Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
131 | # This line needs to be after the ignore of the build folder (and the packages folder if the line above has been uncommented)
132 | !packages/build/
133 |
134 | # Windows Azure Build Output
135 | csx/
136 | *.build.csdef
137 |
138 | # Windows Store app package directory
139 | AppPackages/
140 |
141 | # Others
142 | sql/
143 | *.Cache
144 | ClientBin/
145 | [Ss]tyle[Cc]op.*
146 | ~$*
147 | *~
148 | *.dbmdl
149 | *.dbproj.schemaview
150 | *.pfx
151 | *.publishsettings
152 | node_modules/
153 |
154 | # RIA/Silverlight projects
155 | Generated_Code/
156 |
157 | # Backup & report files from converting an old project file to a newer
158 | # Visual Studio version. Backup files are not needed, because we have git ;-)
159 | _UpgradeReport_Files/
160 | Backup*/
161 | UpgradeLog*.XML
162 | UpgradeLog*.htm
163 |
164 | # SQL Server files
165 | *.mdf
166 | *.ldf
167 |
168 | # Business Intelligence projects
169 | *.rdl.data
170 | *.bim.layout
171 | *.bim_*.settings
172 |
173 | # Microsoft Fakes
174 | FakesAssemblies/
175 |
--------------------------------------------------------------------------------
/Binaries .NET 3.5/Abstracta.FiddlerSessionComparer_3.5.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/Binaries .NET 3.5/Abstracta.FiddlerSessionComparer_3.5.dll
--------------------------------------------------------------------------------
/Binaries .NET 3.5/Abstracta.GXtest.Utils.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/Binaries .NET 3.5/Abstracta.GXtest.Utils.dll
--------------------------------------------------------------------------------
/Binaries .NET 3.5/Abstracta.Generator_3.5.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/Binaries .NET 3.5/Abstracta.Generator_3.5.dll
--------------------------------------------------------------------------------
/Binaries .NET 3.5/Abstracta.ScriptGeneratorGUI_3.5.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/Binaries .NET 3.5/Abstracta.ScriptGeneratorGUI_3.5.exe
--------------------------------------------------------------------------------
/Binaries .NET 3.5/FiddlerCore.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/Binaries .NET 3.5/FiddlerCore.dll
--------------------------------------------------------------------------------
/Binaries .NET 3.5/Ionic.Zip.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/Binaries .NET 3.5/Ionic.Zip.dll
--------------------------------------------------------------------------------
/Binaries .NET 3.5/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/Binaries .NET 3.5/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/Binaries .NET 3.5/Simplicit.Net.Lzo.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/Binaries .NET 3.5/Simplicit.Net.Lzo.dll
--------------------------------------------------------------------------------
/Binaries .NET 4.5/Abstracta.FiddlerSessionComparer_4.5.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/Binaries .NET 4.5/Abstracta.FiddlerSessionComparer_4.5.dll
--------------------------------------------------------------------------------
/Binaries .NET 4.5/Abstracta.GXtest.Utils.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/Binaries .NET 4.5/Abstracta.GXtest.Utils.dll
--------------------------------------------------------------------------------
/Binaries .NET 4.5/Abstracta.Generator_4.5.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/Binaries .NET 4.5/Abstracta.Generator_4.5.dll
--------------------------------------------------------------------------------
/Binaries .NET 4.5/Abstracta.ScriptGeneratorCLI_4.5.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/Binaries .NET 4.5/Abstracta.ScriptGeneratorCLI_4.5.exe
--------------------------------------------------------------------------------
/Binaries .NET 4.5/Abstracta.ScriptGeneratorGUI_4.5.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/Binaries .NET 4.5/Abstracta.ScriptGeneratorGUI_4.5.exe
--------------------------------------------------------------------------------
/Binaries .NET 4.5/FiddlerCore.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/Binaries .NET 4.5/FiddlerCore.dll
--------------------------------------------------------------------------------
/Binaries .NET 4.5/Ionic.Zip.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/Binaries .NET 4.5/Ionic.Zip.dll
--------------------------------------------------------------------------------
/Binaries .NET 4.5/ManyConsole.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/Binaries .NET 4.5/ManyConsole.dll
--------------------------------------------------------------------------------
/Binaries .NET 4.5/NDesk.Options.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/Binaries .NET 4.5/NDesk.Options.dll
--------------------------------------------------------------------------------
/Binaries .NET 4.5/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/Binaries .NET 4.5/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/Binaries .NET 4.5/Simplicit.Net.Lzo.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/Binaries .NET 4.5/Simplicit.Net.Lzo.dll
--------------------------------------------------------------------------------
/Examples/duckduckgo/sessions.saz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/Examples/duckduckgo/sessions.saz
--------------------------------------------------------------------------------
/FiddlerSessionComparerCLI_3.5/FiddlerSessionComparerCLI_3.5.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {8F0A58A6-733D-4FB6-ABF6-593C2A77EA50}
8 | Exe
9 | Properties
10 | Abstracta.FiddlerSessionComparerCLI
11 | Abstracta.FiddlerSessionComparerCLI_3.5
12 | v3.5
13 | 512
14 |
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 | false
26 |
27 |
28 | AnyCPU
29 | pdbonly
30 | true
31 | bin\Release\
32 | TRACE
33 | prompt
34 | 4
35 | false
36 |
37 |
38 |
39 | ..\dependencies\.NET_3.5\FiddlerCore.dll
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | Program.cs
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | {2fed9ccb-c331-4bab-8b8d-17754dc873b7}
60 | FiddlerSessionComparer_3.5
61 |
62 |
63 |
64 |
71 |
--------------------------------------------------------------------------------
/FiddlerSessionComparerCLI_3.5/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("FiddlerSessionComparerCLI_4.5")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("FiddlerSessionComparerCLI_4.5")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("41a781f8-b393-4e45-8c1b-a5df27696218")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/FiddlerSessionComparerCLI_3.5/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/FiddlerSessionComparerCLI_4.5/FiddlerSessionComparerCLI_4.5.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {537D3B50-0FB2-404D-9C0F-05B0FEE63F1A}
8 | Exe
9 | Properties
10 | Abstracta.FiddlerSessionComparerCLI
11 | Abstracta.FiddlerSessionComparerCLI_4.5
12 | v4.5
13 | 512
14 |
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 | false
26 |
27 |
28 | AnyCPU
29 | pdbonly
30 | true
31 | bin\Release\
32 | TRACE
33 | prompt
34 | 4
35 | false
36 |
37 |
38 |
39 | False
40 | ..\dependencies\.NET_4.5\FiddlerCore.dll
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | {e228fdb9-9b9b-43b5-a9c1-ab11aa47f136}
60 | FiddlerSessionComparer_4.5
61 |
62 |
63 |
64 |
71 |
--------------------------------------------------------------------------------
/FiddlerSessionComparerCLI_4.5/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using Abstracta.FiddlerSessionComparer;
4 | using Abstracta.FiddlerSessionComparer.Utils;
5 |
6 | namespace Abstracta.FiddlerSessionComparerCLI
7 | {
8 | public class Program
9 | {
10 | ///
11 | /// This is an example of using the Fiddler session comparer
12 | ///
13 | ///
14 | public static void Main(string[] args)
15 | {
16 | const string fiddlerSessionsFile1 = @"";
17 | const string fiddlerSessionsFile2 = @"";
18 | const string fiddlerSessionsFile3 = @"";
19 |
20 | const string pagesResultFile = @"pruebaAuto-Param.txt";
21 | const bool isGenexusApp = true;
22 | const bool replaceInBodies = true;
23 |
24 | var fiddlerComparer = new FiddlerSessionComparer.FiddlerSessionComparer(replaceInBodies, isGenexusApp);
25 | fiddlerComparer.Load(fiddlerSessionsFile1, fiddlerSessionsFile2, null);
26 |
27 | var result = fiddlerComparer.CompareFull();
28 |
29 | // save page structure result to file
30 | (new StreamWriter(pagesResultFile)).WriteLine(result.ToString("", false));
31 | }
32 |
33 | ///
34 | /// This creates a referers chain from the sessions list
35 | ///
36 | ///
37 | public static void Test(string sessionFileName)
38 | {
39 | var sessions = SazFormat.GetSessionsFromFile(sessionFileName);
40 | if (sessions == null)
41 | {
42 | throw new Exception("Sessions == null");
43 | }
44 |
45 | var referersChain = new Page(null, "", "", "", "", "", -1);
46 |
47 | foreach (var session in sessions)
48 | {
49 | var i = 0;
50 | var headersArray = new string[session.oResponse.headers.Count()];
51 | foreach (var httpResponseHeader in session.oResponse.headers)
52 | {
53 | headersArray[i] = httpResponseHeader.ToString();
54 | i++;
55 | }
56 |
57 | var referer = session.oRequest.headers["Referer"];
58 | var id = session.id;
59 | var uri = session.fullUrl;
60 | var body = session.HTTPMethodIs("POST") ? session.GetRequestBodyAsString() : "";
61 | var htmlResponse = session.GetResponseBodyAsString();
62 | var httpmethod = session.oRequest.headers.HTTPMethod;
63 | var responseHeaders = string.Join("\n", headersArray);
64 | var responseCode = session.responseCode;
65 |
66 | var refererPage = referersChain.FindRefererPage(referer, id);
67 |
68 | if (refererPage == null)
69 | {
70 | referersChain.Followers.Add(new Page(new Page(null, referer, "", "", "", "", -1), uri, body, htmlResponse, httpmethod, responseHeaders, responseCode));
71 | }
72 | else
73 | {
74 | refererPage.Followers.Add(new Page(refererPage, uri, body, htmlResponse, httpmethod, responseHeaders, responseCode));
75 | }
76 | }
77 |
78 | using (var fw = new StreamWriter(sessionFileName + "out.txt"))
79 | {
80 | fw.Write(referersChain.ToString("", false));
81 | }
82 | }
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/FiddlerSessionComparerCLI_4.5/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("FiddlerSessionComparerCLI_4.5")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("FiddlerSessionComparerCLI_4.5")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("41a781f8-b393-4e45-8c1b-a5df27696218")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/FiddlerSessionComparerCLI_4.5/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/FiddlerSessionComparerGUI_4.5/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/FiddlerSessionComparerGUI_4.5/App.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/FiddlerSessionComparerGUI_4.5/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace FiddlerSessionComparerUI
10 | {
11 | ///
12 | /// Interaction logic for App.xaml
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/FiddlerSessionComparerGUI_4.5/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/FiddlerSessionComparerGUI_4.5/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Data;
3 | using System.Linq;
4 | using System.Windows;
5 | using System.Windows.Controls;
6 | using Abstracta.FiddlerSessionComparer;
7 | using Fiddler;
8 |
9 | namespace Abstracta.FiddlerSessionComparerGUI
10 | {
11 | ///
12 | /// Interaction logic for MainWindow.xaml
13 | ///
14 | public partial class MainWindow
15 | {
16 | private string _ruta1;
17 | private string _ruta2;
18 | private string _extenssions;
19 | private Session[] _sessions1;
20 | private Session[] _sessions2;
21 | private Session _session1;
22 | private Session _session2;
23 |
24 | private readonly FiddlerSessionComparer.FiddlerSessionComparer _fsc;
25 |
26 | public MainWindow()
27 | {
28 | InitializeComponent();
29 | Lista1.SelectionMode = SelectionMode.Single;
30 | Lista2.SelectionMode = SelectionMode.Single;
31 |
32 | _fsc = new FiddlerSessionComparer.FiddlerSessionComparer(true, true);
33 |
34 | // for testing porposes
35 | /*
36 | _fsc.Load(_ruta1, _ruta2, null, out _sessions1, out _sessions2);
37 | Lista1.ItemsSource = _sessions1.ToList().Select(s => s.fullUrl);
38 | Lista2.ItemsSource = _sessions2.ToList().Select(s => s.fullUrl);
39 |
40 | Lista1.SelectedIndex = Lista2.SelectedIndex = 7;
41 | // */
42 | }
43 |
44 | private void Comparar_Click(object sender, RoutedEventArgs e)
45 | {
46 | var results = _fsc.CompareSimple(_session1.id, _session2.id, ComparerResultType.ShowAll);
47 |
48 | var table = new DataTable();
49 | table.Columns.Add("Parametro");
50 | table.Columns.Add("Valor saz 1");
51 | table.Columns.Add("Valor saz 2");
52 | table.Columns.Add("Iguales?");
53 |
54 | foreach (var result in results)
55 | {
56 | var row = table.NewRow();
57 | row.ItemArray = new object[] {result.Key, result.Value1, result.Value2, result.AreEqual};
58 |
59 | table.Rows.Add(row);
60 | }
61 |
62 | Grilla.ItemsSource = table.DefaultView;
63 | Grilla.AutoGenerateColumns = true;
64 | }
65 |
66 | private void Ruta1_TextChanged(object sender, TextChangedEventArgs e)
67 | {
68 | _ruta1 = ((TextBox) sender).Text;
69 | }
70 |
71 | private void Ruta2_TextChanged(object sender, TextChangedEventArgs e)
72 | {
73 | _ruta2 = ((TextBox)sender).Text;
74 | }
75 |
76 | private void Cargar_Click(object sender, RoutedEventArgs e)
77 | {
78 | var extenssionsList = _extenssions != "" ? _extenssions.Split(',') : null;
79 |
80 | try
81 | {
82 | _sessions1 = FiddlerSessionComparer.FiddlerSessionComparer.GetSessionsFromFile(_ruta1);
83 | _sessions2 = FiddlerSessionComparer.FiddlerSessionComparer.GetSessionsFromFile(_ruta2);
84 |
85 | _fsc.Load(_sessions1, _sessions2, extenssionsList);
86 |
87 | Lista1.ItemsSource = _sessions1.ToList().Select(s => s.fullUrl);
88 | Lista2.ItemsSource = _sessions2.ToList().Select(s => s.fullUrl);
89 | }
90 | catch (Exception ex)
91 | {
92 | MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
93 | }
94 | }
95 |
96 | private void Extensiones_TextChanged(object sender, TextChangedEventArgs e)
97 | {
98 | _extenssions = ((TextBox)sender).Text;
99 | }
100 |
101 | private void Lista1_SelectionChanged(object sender, SelectionChangedEventArgs e)
102 | {
103 | _session1 = _sessions1[Lista1.SelectedIndex];
104 | }
105 |
106 | private void Lista2_SelectionChanged(object sender, SelectionChangedEventArgs e)
107 | {
108 | _session2 = _sessions2[Lista2.SelectedIndex];
109 | }
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/FiddlerSessionComparerGUI_4.5/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | [assembly: AssemblyTitle("FiddlerSessionComparerUI")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("Toshiba")]
14 | [assembly: AssemblyProduct("FiddlerSessionComparerUI")]
15 | [assembly: AssemblyCopyright("Copyright © Toshiba 2014")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | //In order to begin building localizable applications, set
25 | //CultureYouAreCodingWith in your .csproj file
26 | //inside a . For example, if you are using US english
27 | //in your source files, set the to en-US. Then uncomment
28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
29 | //the line below to match the UICulture setting in the project file.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36 | //(used if a resource is not found in the page,
37 | // or application resource dictionaries)
38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39 | //(used if a resource is not found in the page,
40 | // app, or any theme specific resource dictionaries)
41 | )]
42 |
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/FiddlerSessionComparerGUI_4.5/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.18444
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Abstracta.FiddlerSessionComparerGUI.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Abstracta.FiddlerSessionComparerGUI.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/FiddlerSessionComparerGUI_4.5/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.18444
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Abstracta.FiddlerSessionComparerGUI.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/FiddlerSessionComparerGUI_4.5/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/FiddlerSessionComparerGUI_4.5/Readme.txt:
--------------------------------------------------------------------------------
1 | http://jsonviewer.stack.hu/
--------------------------------------------------------------------------------
/FiddlerSessionComparerTests_4.5/FiddlerSessionComparerTests_4.5.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | {AA6CD392-CD21-4F30-9DB1-2F00557A3E10}
7 | Library
8 | Properties
9 | Abstracta.FiddlerSessionComparerTests
10 | Abstracta.FiddlerSessionComparerTests_4.5
11 | v4.5
12 | 512
13 | {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
14 | 10.0
15 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
16 | $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages
17 | False
18 | UnitTest
19 |
20 |
21 | true
22 | full
23 | false
24 | bin\Debug\
25 | DEBUG;TRACE
26 | prompt
27 | 4
28 |
29 |
30 | pdbonly
31 | true
32 | bin\Release\
33 | TRACE
34 | prompt
35 | 4
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | {E228FDB9-9B9B-43B5-A9C1-AB11AA47F136}
61 | FiddlerSessionComparer_4.5
62 |
63 |
64 |
65 |
66 |
67 |
68 | False
69 |
70 |
71 | False
72 |
73 |
74 | False
75 |
76 |
77 | False
78 |
79 |
80 |
81 |
82 |
83 |
84 |
91 |
--------------------------------------------------------------------------------
/FiddlerSessionComparerTests_4.5/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("FiddlerSessionComparerTests_4.5")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("FiddlerSessionComparerTests_4.5")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("db43c876-9bc1-4e77-804f-4005b7a7ad9d")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/FiddlerSessionComparerTests_4.5/XMLParse.cs:
--------------------------------------------------------------------------------
1 | using Abstracta.FiddlerSessionComparer.Content;
2 | using Microsoft.VisualStudio.TestTools.UnitTesting;
3 |
4 | namespace Abstracta.FiddlerSessionComparerTests
5 | {
6 | [TestClass]
7 | public class XMLParse
8 | {
9 | [TestMethod]
10 | [Owner("SDU")]
11 | public void XmlContentType_01()
12 | {
13 | const string xmlString = "" +
14 | " " +
15 | " Home" +
16 | " impspuhome" +
17 | " " +
18 | " " +
19 | " Plan Comercial" +
20 | " wwspuplancomercial?82sPNmMP8O3TlpdEZk1r8A==" +
21 | " " +
22 | " " +
23 | " Datos de Plan" +
24 | " entitymanagerspuplancomercial?ZkXtkIVyfkuci1dQyGquy+ga2TsISqX52M2Wex3ND4EzzuYK+wUlDHuBPv5blE5O" +
25 | " " +
26 | "";
27 |
28 | var res = XmlContentType.Deserialize(xmlString);
29 |
30 | Assert.AreEqual("K2BStack", res.TagName);
31 | Assert.AreEqual(1, res.Attributes.Count);
32 | Assert.AreEqual(3, res.Children.Count);
33 |
34 | Assert.AreEqual("impspuhome", res.Children[0].Children[1].Value);
35 | Assert.AreEqual("wwspuplancomercial?82sPNmMP8O3TlpdEZk1r8A==", res.Children[1].Children[1].Value);
36 | Assert.AreEqual("entitymanagerspuplancomercial?ZkXtkIVyfkuci1dQyGquy+ga2TsISqX52M2Wex3ND4EzzuYK+wUlDHuBPv5blE5O", res.Children[2].Children[1].Value);
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/FiddlerSessionComparer_3.5/Content/Tuple.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace Abstracta.FiddlerSessionComparer.Content
3 | {
4 | public class Tuple
5 | {
6 | internal T1 Item1 { get; set; }
7 | internal T2 Item2 { get; set; }
8 |
9 | internal Tuple(T1 item1, T2 item2)
10 | {
11 | Item1 = item1;
12 | Item2 = item2;
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/FiddlerSessionComparer_3.5/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("FiddlerSessionComparer")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("FiddlerSessionComparer")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("35d8d2e1-8eab-4bc8-9709-f26ba75f7ddd")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/FiddlerSessionComparer_3.5/Utils/EmptyFile.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/FiddlerSessionComparer_3.5/Utils/EmptyFile.txt
--------------------------------------------------------------------------------
/FiddlerSessionComparer_3.5/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/FiddlerSessionComparer_4.5/ComparerResultType.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.FiddlerSessionComparer
2 | {
3 | public enum ComparerResultType
4 | {
5 | ///
6 | /// ShowAll refers to all parameters, equals and differents, including NULL ones.
7 | /// HideEquals refers the parameters that are not equals: differents and NULL ones.
8 | /// HideNullOrEquals refers only to differents paramenters, but not NULL ones.
9 | ///
10 | ShowAll,
11 | HideEquals,
12 | HideNullOrEquals
13 | }
14 | }
--------------------------------------------------------------------------------
/FiddlerSessionComparer_4.5/Content/ContentFactory.cs:
--------------------------------------------------------------------------------
1 | using System.Globalization;
2 |
3 | namespace Abstracta.FiddlerSessionComparer.Content
4 | {
5 | public abstract class ContentFactory
6 | {
7 | public static bool IsComplexType(string varValue)
8 | {
9 | return IsJSON(varValue) || IsXML(varValue);
10 | }
11 |
12 | public static bool IsJSON(string value)
13 | {
14 | // '%7B' = '{' -> escaped JSON
15 | return value.StartsWith("{") || value.StartsWith("%7B", true, CultureInfo.InvariantCulture);
16 | }
17 |
18 | public static bool IsXML(string value)
19 | {
20 | // '%7C' = '<' -> escaped XML
21 | return value.StartsWith("<") || value.StartsWith("%7C", true, CultureInfo.InvariantCulture);
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/FiddlerSessionComparer_4.5/EqualsResult.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.FiddlerSessionComparer
2 | {
3 | public class EqualsResult
4 | {
5 | public string Key { get; private set; }
6 |
7 | public string Value1 { get; private set; }
8 |
9 | public string Value2 { get; private set; }
10 |
11 | public bool AreEqual { get; private set; }
12 |
13 | public EqualsResult(string key, string value1, string value2)
14 | {
15 | Key = key;
16 | Value1 = value1;
17 | Value2 = value2;
18 |
19 | AreEqual = Value1 == Value2;
20 | }
21 |
22 | public override string ToString()
23 | {
24 | return "{ " +
25 | "VariableName='" + Key + "' " +
26 | "AreEqual='" + AreEqual + "' " +
27 | "Value1='" + Value1 + "' " +
28 | "Value2='" + Value2 + "' " +
29 | "}";
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/FiddlerSessionComparer_4.5/FiddlerSessionComparer_4.5.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {E228FDB9-9B9B-43B5-A9C1-AB11AA47F136}
8 | Library
9 | Properties
10 | Abstracta.FiddlerSessionComparer
11 | Abstracta.FiddlerSessionComparer_4.5
12 | v4.5
13 | 512
14 |
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 | false
26 |
27 |
28 | AnyCPU
29 | pdbonly
30 | true
31 | bin\Release\
32 | TRACE
33 | prompt
34 | 4
35 | false
36 |
37 |
38 |
39 |
40 |
41 |
42 | ..\dependencies\.NET_4.5\FiddlerCore.dll
43 |
44 |
45 | False
46 | ..\dependencies\Ionic.Zip.dll
47 |
48 |
49 |
50 | ..\dependencies\.NET_4.5\Newtonsoft.Json.dll
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
91 |
--------------------------------------------------------------------------------
/FiddlerSessionComparer_4.5/ParameterDefinition.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Newtonsoft.Json.Linq;
3 |
4 | namespace Abstracta.FiddlerSessionComparer
5 | {
6 | public enum ParameterContext
7 | {
8 | Default,
9 | AloneValue,
10 | FirstComaSeparatedValue,
11 | ComaSeparatedValue,
12 | LastComaSeparatedValue,
13 | KeyEqualValue,
14 |
15 | XMLAttribute,
16 | XMLValue,
17 |
18 | JSonNumberValue,
19 | JSonStringValue,
20 | JSonDateValue,
21 | }
22 |
23 | public class ParameterDefinition
24 | {
25 | public string Key { get; set; }
26 | public string Value { get; set; }
27 | public ParameterContext Context { get; set; }
28 |
29 | public ParameterDefinition(string key, string value, ParameterContext pContext)
30 | {
31 | Key = key;
32 | Value = value;
33 | Context = pContext;
34 | }
35 |
36 | protected bool Equals(ParameterDefinition other)
37 | {
38 | return string.Equals(Key, other.Key) && string.Equals(Value, other.Value) && Context == other.Context;
39 | }
40 |
41 | public override int GetHashCode()
42 | {
43 | unchecked
44 | {
45 | var hashCode = (Key != null ? Key.GetHashCode() : 0);
46 | hashCode = (hashCode*397) ^ (Value != null ? Value.GetHashCode() : 0);
47 | hashCode = (hashCode*397) ^ (int) Context;
48 |
49 | return hashCode;
50 | }
51 | }
52 |
53 | public override bool Equals(object obj)
54 | {
55 | if (ReferenceEquals(null, obj)) return false;
56 | if (ReferenceEquals(this, obj)) return true;
57 |
58 | return obj.GetType() == GetType() && Equals((ParameterDefinition) obj);
59 | }
60 |
61 | public override string ToString()
62 | {
63 | return Context + ": " + Key + ":" + Value;
64 | }
65 |
66 | public static ParameterContext GetContextFromJPropertyType(JTokenType type)
67 | {
68 | switch (type)
69 | {
70 | case JTokenType.Integer:
71 | case JTokenType.Float:
72 | case JTokenType.Bytes:
73 | case JTokenType.Guid:
74 | case JTokenType.TimeSpan:
75 | case JTokenType.Boolean:
76 | return ParameterContext.JSonNumberValue;
77 |
78 | case JTokenType.String:
79 | case JTokenType.Null:
80 | return ParameterContext.JSonStringValue;
81 |
82 | case JTokenType.Date:
83 | return ParameterContext.JSonDateValue;
84 |
85 | default:
86 | return ParameterContext.Default;
87 | }
88 | }
89 |
90 | public static ParameterContext GetContextFromStringValue(object value)
91 | {
92 | if (value is string)
93 | {
94 | return ParameterContext.JSonStringValue;
95 | }
96 |
97 | if (value is int || value is long || value is float || value is double)
98 | {
99 | return ParameterContext.JSonNumberValue;
100 | }
101 |
102 | if (value is DateTime || value is TimeSpan)
103 | {
104 | return ParameterContext.JSonDateValue;
105 | }
106 |
107 | return ParameterContext.JSonStringValue;
108 | }
109 |
110 | public static ParameterContext GetContextFromStringValue(string stringValue)
111 | {
112 | var result = ParameterContext.JSonStringValue;
113 |
114 | int intValue;
115 | var parsed = int.TryParse(stringValue, out intValue);
116 | if (parsed)
117 | {
118 | result = ParameterContext.JSonNumberValue;
119 | }
120 | else
121 | {
122 | double doubleValue;
123 | parsed = double.TryParse(stringValue, out doubleValue);
124 | if (parsed)
125 | {
126 | result = ParameterContext.JSonNumberValue;
127 | }
128 | else
129 | {
130 | DateTime dateTimeValue;
131 | parsed = DateTime.TryParse(stringValue, out dateTimeValue);
132 | if (parsed)
133 | {
134 | result = ParameterContext.JSonDateValue;
135 | }
136 | }
137 | }
138 |
139 | return result;
140 | }
141 | }
142 | }
--------------------------------------------------------------------------------
/FiddlerSessionComparer_4.5/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("FiddlerSessionComparer")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("FiddlerSessionComparer")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("35d8d2e1-8eab-4bc8-9709-f26ba75f7ddd")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/FiddlerSessionComparer_4.5/RegExpExtractor.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.FiddlerSessionComparer
2 | {
3 | public class RegExpExtractor : Extractor
4 | {
5 | public int GroupNumber { get; set; }
6 |
7 | public string RegExp { get; set; }
8 |
9 | public RegExpExtractor(int groupNumber, string regExp)
10 | {
11 | GroupNumber = groupNumber;
12 | RegExp = regExp;
13 | }
14 |
15 | public override string ToString()
16 | {
17 | return "{ " +
18 | "GroupNumber='" + GroupNumber + "' " +
19 | "RegExp='" + RegExp + "' " +
20 | ////"ReplaceValue='" + ReplaceValue + "' " +
21 | ////"ReplaceWith='" + ReplaceWith + "'" +
22 | "}";
23 | }
24 | }
25 |
26 | public class Extractor
27 | {
28 | }
29 | }
--------------------------------------------------------------------------------
/FiddlerSessionComparer_4.5/Replacement.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.FiddlerSessionComparer
2 | {
3 | public class Replacement
4 | {
5 | ///
6 | /// This is the parameterName
7 | ///
8 | public string ReplaceWith { get; set; }
9 |
10 | ///
11 | /// This is the parameterValue
12 | ///
13 | public string ReplaceValue { get; set; }
14 |
15 | public Replacement(string replaceWith, string replaceValue)
16 | {
17 | ReplaceWith = replaceWith;
18 | ReplaceValue = replaceValue;
19 | }
20 |
21 | public override string ToString()
22 | {
23 | return "{ " +
24 | "ConstantName='" + ReplaceWith + "' " +
25 | "ConstantValue='" + ReplaceValue + "' " +
26 | "}";
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/FiddlerSessionComparer_4.5/Utils/FiddlerSessionExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using Fiddler;
5 |
6 | namespace Abstracta.FiddlerSessionComparer.Utils
7 | {
8 | public static class FiddlerSessionExtension
9 | {
10 | public static bool IsPrimaryRequest(this Session session)
11 | {
12 | return SessionUtils.IsPrimaryReq(session);
13 | }
14 |
15 | public static bool IsSecondaryRequest(this Session session)
16 | {
17 | return !session.IsPrimaryRequest();
18 | }
19 |
20 | public static bool IsRedirectByResponseCode(this Session request)
21 | {
22 | return 400 > request.responseCode && request.responseCode >= 300;
23 | }
24 |
25 | public static bool IsRedirectByJavaScript(this Session request)
26 | {
27 | return IsGenexusRedirect(request) /* || IsOtherKindOfRedirect() */;
28 | }
29 |
30 | public static bool IsGenexusRedirect(this Session request)
31 | {
32 | var gxCommands = GetGxCommandsFromBody(request);
33 |
34 | return gxCommands.Any(command => command == "redirect");
35 | }
36 |
37 | public static List GetGxCommandsFromBody(this Session request)
38 | {
39 | var body = request.GetResponseBodyAsString();
40 | var index = body.IndexOf("\"gxCommands\"", StringComparison.Ordinal);
41 |
42 | if (index < 0)
43 | {
44 | return new List();
45 | }
46 |
47 | var reading = false;
48 | var commands = new System.Text.StringBuilder();
49 | var buffer = new char[100];
50 | var bufferIndex = 0;
51 | while (body[index] != ']')
52 | {
53 | if (reading)
54 | {
55 | buffer[bufferIndex] = body[index];
56 | bufferIndex++;
57 |
58 | if (bufferIndex == 100)
59 | {
60 | commands.Append(buffer);
61 | buffer = new char[100];
62 | bufferIndex = 0;
63 | }
64 | }
65 |
66 | if (body[index] == '[')
67 | {
68 | reading = true;
69 | }
70 |
71 | index++;
72 | }
73 |
74 | /*
75 | "gxCommands":
76 | [
77 | {"popup":["wc_confirmaoferta?bIA6MwXk3GlbytteOKWIoNQ7n67/HxEAc8/wrIi0OYTLHeDUO6BhVtSuZuVjtP6T",1,0,0,0,0,0,[],[]]},
78 | {"refresh":"POST"},
79 | {"redirect":"subastasactivas"},
80 | ]
81 | */
82 |
83 | var commandsStr = commands.Append(buffer, 0, bufferIndex).ToString();
84 | var commandsArray = commandsStr.Split('{');
85 |
86 | return (from commandStr in commandsArray
87 | where !StringUtils.IsNullOrWhiteSpace(commandStr)
88 | select commandStr.Split(':')[0].Split('"')[1]).ToList();
89 | }
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/FiddlerSessionComparer_4.5/Utils/Logger.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 |
3 | namespace Abstracta.FiddlerSessionComparer.Utils
4 | {
5 | internal class Logger
6 | {
7 | private static volatile Logger _instance;
8 | private static readonly object Lock = new object();
9 |
10 | private const string FileName = "FiddlerSessionComparer_Logger.txt";
11 |
12 | internal static Logger GetInstance()
13 | {
14 | if (_instance == null)
15 | {
16 | lock (Lock)
17 | {
18 | if (_instance == null)
19 | {
20 | _instance = new Logger();
21 | }
22 | }
23 | }
24 | return _instance;
25 | }
26 |
27 | internal void Log(object log)
28 | {
29 | using (var file = new StreamWriter(FileName, true))
30 | {
31 | file.WriteLine(System.DateTime.Now + " - " + log);
32 | }
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/FiddlerSessionComparer_4.5/Utils/NameFactory.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Abstracta.FiddlerSessionComparer.Utils
4 | {
5 | public class NameFactory
6 | {
7 | private static volatile NameFactory _instance;
8 | private static readonly object Lock = new object();
9 | private Dictionary _nameRegister;
10 |
11 | public static NameFactory GetInstance()
12 | {
13 | if (_instance == null)
14 | {
15 | lock (Lock)
16 | {
17 | if (_instance == null)
18 | {
19 | _instance = new NameFactory();
20 | }
21 | }
22 | }
23 | return _instance;
24 | }
25 |
26 | public NameFactory()
27 | {
28 | Reset();
29 | }
30 |
31 | public string GetNewName(string name)
32 | {
33 | if (!_nameRegister.ContainsKey(name))
34 | {
35 | _nameRegister.Add(name, -1);
36 | }
37 |
38 | return name + "_" + ++_nameRegister[name];
39 | }
40 |
41 | public string GetNewName()
42 | {
43 | return "URL_Params_Comparer" + "_" + ++_nameRegister["URL_Params_Comparer"];
44 | }
45 |
46 | public void Reset()
47 | {
48 | _nameRegister = new Dictionary
49 | {
50 | { "URL_Params_Comparer", -1 }
51 | };
52 | }
53 | }
54 | }
--------------------------------------------------------------------------------
/FiddlerSessionComparer_4.5/Utils/SessionUtils.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using Fiddler;
6 |
7 | namespace Abstracta.FiddlerSessionComparer.Utils
8 | {
9 | internal class SessionUtils
10 | {
11 | private static readonly string ExtensionsFile =
12 | Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) +
13 | "\\Fiddler2\\Scripts\\Extensiones.txt";
14 |
15 | private static readonly string CookiesFile = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) +
16 | "\\Fiddler2\\Scripts\\Extensiones.txt";
17 |
18 | // whitelist de extensiones para pedidos primarios
19 | internal static List Extensiones = null;
20 |
21 | // blacklist de cookies para dejar hardcodeadas
22 | internal static List Cookies = null;
23 |
24 | //// private static readonly string[] PrimaryExtensions = new[] {".htm", ".html", ".aspx", ".ashx", ".php", "faces", "svc", ".svc/"};
25 |
26 | private static readonly string[] SecondaryExtensions = new[] {".js", ".css", ".jpg", ".jpeg", ".png", ".gif",".ico", ".woff"};
27 |
28 | internal static bool IsPrimaryReq(Session req)
29 | {
30 | // NP 22/08/2013 - Se agrega soporte para Java Server Faces
31 | // NP 29/11/2013 - Se agrega soporte para PHP y ashx
32 | // NP 17/01/2014 - Se agrega soporte pra .svc
33 | // NP 23/01/2014 - Se agrega la lectura opcional de un archivo en el que se pueden especificar
34 | // nuevas extensiones a ser consideradas pedidos primarios.
35 | var uri = new Uri(req.fullUrl).LocalPath.ToLower();
36 |
37 | var isSecondaryReq = SecondaryExtensions.Any(uri.EndsWith);
38 | var isSecondaryReq2 = isSecondaryReq || SecondaryExtensions.Any(h => uri.Contains(h + "?"));
39 | var isSecondaryReq3 = isSecondaryReq2 || uri.Contains("GXResourceProv");
40 |
41 | return !isSecondaryReq3;
42 |
43 | /*
44 | return (PrimaryExtensions.Any(primaryExtension => uri.LocalPath.EndsWith(primaryExtension))
45 | || BuscarEnArchivoExtensiones(uri.LocalPath)
46 | || uri.LocalPath.Split('.').Length == 1)
47 | && !uri.LocalPath.Contains("GXResourceProv");
48 | */
49 | }
50 |
51 | // NP - 23/01/2014
52 | // Se implementan funciones para cargar una lista de extensiones de un archivo Extensiones.txt ubicado en el directorio de la dll,
53 | // y para realizar búsquedas de dichas extensiones en el path de la url recibido.
54 | private static bool BuscarEnArchivoExtensiones(string path)
55 | {
56 | if (Extensiones == null)
57 | {
58 | LeerArchivoExtensiones();
59 | }
60 |
61 | return Extensiones != null && Extensiones.Any(path.EndsWith);
62 | }
63 |
64 | private static void LeerArchivoExtensiones()
65 | {
66 | var filePath = ExtensionsFile;
67 |
68 | Extensiones = new List();
69 | if (!File.Exists(filePath)) return;
70 |
71 | using (var file = new StreamReader(filePath))
72 | {
73 | string linea;
74 | while ((linea = file.ReadLine()) != null)
75 | {
76 | Extensiones.Add(linea);
77 | }
78 | }
79 | }
80 |
81 | // NP - 24/01/2014
82 | // Se implementan funciones para cargar una lista de cookies de un archivo Cookies.txt ubicado en el directorio de la dll,
83 | // y para realizar búsquedas de dichas cookies en el string de la cookie recibida.
84 | internal static bool BuscarEnArchivoCookies(string cookie)
85 | {
86 | if (Cookies == null)
87 | {
88 | LeerArchivoCookies();
89 | }
90 |
91 | return Cookies != null && Cookies.Any(cookie.Contains);
92 | }
93 |
94 | private static void LeerArchivoCookies()
95 | {
96 | var filePath = CookiesFile;
97 |
98 | Cookies = new List();
99 | if (!File.Exists(filePath)) return;
100 |
101 | using (var file = new StreamReader(filePath))
102 | {
103 | string linea;
104 | while ((linea = file.ReadLine()) != null)
105 | {
106 | Cookies.Add(linea);
107 | }
108 | }
109 | }
110 | }
111 | }
--------------------------------------------------------------------------------
/FiddlerSessionComparer_4.5/Utils/StringUtils.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.FiddlerSessionComparer.Utils
2 | {
3 | public class StringUtils
4 | {
5 | public static bool IsNullOrWhiteSpace(string str)
6 | {
7 | return string.IsNullOrEmpty(str.Trim());
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/FiddlerSessionComparer_4.5/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/GeneratorFramework_3.5/AbstractGenerator/Extensions/EmptyFile.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/GeneratorFramework_3.5/AbstractGenerator/Extensions/EmptyFile.txt
--------------------------------------------------------------------------------
/GeneratorFramework_3.5/AbstractGenerator/ParameterExtractor/EmptyFile.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/GeneratorFramework_3.5/AbstractGenerator/ParameterExtractor/EmptyFile.txt
--------------------------------------------------------------------------------
/GeneratorFramework_3.5/AbstractGenerator/Validations/EmptyFile.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/GeneratorFramework_3.5/AbstractGenerator/Validations/EmptyFile.txt
--------------------------------------------------------------------------------
/GeneratorFramework_3.5/AbstractGenerator/Wrapper/EmptyFile.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/GeneratorFramework_3.5/AbstractGenerator/Wrapper/EmptyFile.txt
--------------------------------------------------------------------------------
/GeneratorFramework_3.5/AbstractGenerator/Wrappers/EmptyFile.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/GeneratorFramework_3.5/AbstractGenerator/Wrappers/EmptyFile.txt
--------------------------------------------------------------------------------
/GeneratorFramework_3.5/Constants/EmptyFile.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/GeneratorFramework_3.5/Constants/EmptyFile.txt
--------------------------------------------------------------------------------
/GeneratorFramework_3.5/JMeterGenerator/AuxiliarClasses/EmptyFile.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/GeneratorFramework_3.5/JMeterGenerator/AuxiliarClasses/EmptyFile.txt
--------------------------------------------------------------------------------
/GeneratorFramework_3.5/JMeterGenerator/ParameterExtractor/EmptyFile.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/GeneratorFramework_3.5/JMeterGenerator/ParameterExtractor/EmptyFile.txt
--------------------------------------------------------------------------------
/GeneratorFramework_3.5/JMeterGenerator/Validations/EmptyFile.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/GeneratorFramework_3.5/JMeterGenerator/Validations/EmptyFile.txt
--------------------------------------------------------------------------------
/GeneratorFramework_3.5/OSTAGenerator/AuxiliarClasses/SCLSnippets/EmptyFile.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/GeneratorFramework_3.5/OSTAGenerator/AuxiliarClasses/SCLSnippets/EmptyFile.txt
--------------------------------------------------------------------------------
/GeneratorFramework_3.5/OSTAGenerator/AuxiliarClasses/Scripts/EmptyFile.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/GeneratorFramework_3.5/OSTAGenerator/AuxiliarClasses/Scripts/EmptyFile.txt
--------------------------------------------------------------------------------
/GeneratorFramework_3.5/OSTAGenerator/ParameterExtractor/EmptyFile.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/GeneratorFramework_3.5/OSTAGenerator/ParameterExtractor/EmptyFile.txt
--------------------------------------------------------------------------------
/GeneratorFramework_3.5/OSTAGenerator/Validations/EmptyFile.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/GeneratorFramework_3.5/OSTAGenerator/Validations/EmptyFile.txt
--------------------------------------------------------------------------------
/GeneratorFramework_3.5/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("GeneratorFramework_3.5")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("GeneratorFramework_3.5")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("283708e2-d978-4973-b83c-c8269164883f")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/GeneratorFramework_3.5/TestingGenerator/ParameterExtractor/EmptyFile.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/GeneratorFramework_3.5/TestingGenerator/ParameterExtractor/EmptyFile.txt
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/AbstractGenerator/AbstractFollowRedirect.cs:
--------------------------------------------------------------------------------
1 | using Abstracta.FiddlerSessionComparer;
2 | using Abstracta.Generators.Framework.JMeterGenerator.ParameterExtractor;
3 |
4 | namespace Abstracta.Generators.Framework.AbstractGenerator
5 | {
6 | using Fiddler;
7 |
8 | internal class AbstractFollowRedirect : HTTPRequest
9 | {
10 | public AbstractFollowRedirect(Session request, RedirectType rType, Page page) : base(request, page)
11 | {
12 | RedirectType = rType;
13 | }
14 |
15 | internal RedirectType RedirectType { get; set; }
16 |
17 | public void AddParameterToUse(JMeterRegExParameter parameter)
18 | {
19 | ParametersToUse.Add(parameter);
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/AbstractGenerator/AbstractGenerator.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 |
4 | namespace Abstracta.Generators.Framework.AbstractGenerator
5 | {
6 | internal abstract class AbstractGenerator
7 | {
8 | protected List Steps;
9 |
10 | protected string ScriptName, HomeFolder, ServerName, WebAppName;
11 | protected bool IsBMScript, IsSecondary, IsBeanShell, IsGxApp;
12 |
13 | internal abstract void AddDataPools(List dataPools, string dataPoolFilesPath);
14 |
15 | internal abstract AbstractStep AddStep(string name, string type, string description, ScriptGenerator generator, int index);
16 |
17 | internal virtual void Initialize(string outPath, string mainScriptName, string serverName, string webAppName, bool isBMScript = false, bool isSecondary = true, bool isBeanShell = true, bool isGxApp = false)
18 | {
19 | HomeFolder = outPath;
20 | ScriptName = mainScriptName;
21 | ServerName = serverName;
22 | WebAppName = webAppName;
23 | IsBMScript = isBMScript;
24 | IsSecondary = isSecondary;
25 | IsBeanShell = isBeanShell;
26 | IsGxApp = isGxApp;
27 |
28 | Steps = new List();
29 | }
30 |
31 | protected virtual void AddStep(AbstractStep step)
32 | {
33 | Steps.Add(step);
34 | }
35 |
36 | internal virtual AbstractStep GetLastStep()
37 | {
38 | return Steps.Last();
39 | }
40 |
41 | internal abstract void Save();
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/AbstractGenerator/AbstractPageRequest.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using Abstracta.FiddlerSessionComparer;
4 | using Abstracta.Generators.Framework.AbstractGenerator.Validations;
5 | using Fiddler;
6 |
7 | namespace Abstracta.Generators.Framework.AbstractGenerator
8 | {
9 | internal enum RedirectType
10 | {
11 | ByResponseCode,
12 | ByJavaScript,
13 | }
14 |
15 | internal class AbstractPageRequest : HTTPRequest
16 | {
17 | protected AbstractStep MyStep { get; private set; }
18 |
19 | internal int ResponseCode
20 | {
21 | get { return FiddlerSession.responseCode; }
22 | }
23 |
24 | internal List FollowRedirects { get; private set; }
25 |
26 | internal List SecondaryRequests { get; set; }
27 |
28 | internal long ThinkTime { get; set; }
29 |
30 | internal AbstractPageRequest(Session request, AbstractStep myStep, Page page)
31 | : base(request, page)
32 | {
33 | Validations.Add(myStep.CreateDefaultValidationFromRequest(request));
34 | FollowRedirects = new List();
35 | SecondaryRequests = new List();
36 |
37 | MyStep = myStep;
38 | }
39 |
40 | ///
41 | /// Creates a variable of type AbstractFollowRedirect, add in the FollowRedirect list and return de variable.
42 | ///
43 | /// Session of request
44 | /// Redirect Type
45 | /// Page of request
46 | ///
47 | /// Returns the variable created
48 | internal AbstractFollowRedirect AddFollowRedirect(Session request, RedirectType rType, Page page, List validations)
49 | {
50 | var redirect = new AbstractFollowRedirect(request, rType, page);
51 | redirect.Validations.AddRange(validations);
52 | FollowRedirects.Add(redirect);
53 |
54 | return redirect;
55 | }
56 |
57 | internal void AddFollowRedirect(AbstractFollowRedirect followRedirect)
58 | {
59 | FollowRedirects.Add(followRedirect);
60 | }
61 |
62 | ///
63 | /// Adds the session received as parameter in SecondaryRequest list.
64 | ///
65 | /// Session to add
66 | internal void AddSecondaryRequest(Session httpReq)
67 | {
68 | SecondaryRequests.Add(httpReq);
69 | }
70 |
71 | ///
72 | /// Returns the last Primary request of the FollowRedirects list
73 | ///
74 | /// Last session of the list
75 | internal HTTPRequest GetLastPrimaryRequest()
76 | {
77 | if (FollowRedirects == null || FollowRedirects.Count == 0)
78 | {
79 | return this;
80 | }
81 |
82 | return FollowRedirects[FollowRedirects.Count - 1];
83 | }
84 |
85 | ///
86 | /// Returns if a request is a follow redirect.
87 | ///
88 | /// URL of request
89 | /// Returns true if the request belongs to FollowRedirects list or false otherwise
90 | public bool IsUrlInFollowRedirectChain(string url)
91 | {
92 | return url == RefererURL || FollowRedirects.Any(followRedirect => followRedirect.FiddlerSession.fullUrl == url);
93 | }
94 |
95 | ///
96 | /// Adds the validation received as parameter in the validations list.
97 | ///
98 | /// Validation to add
99 | public void AddValidation(AbstractValidation val)
100 | {
101 | if (Validations.Count == 1 && Validations[0] is DefaultValidation)
102 | {
103 | Validations.RemoveAt(0);
104 | }
105 |
106 | Validations.Add(val);
107 | }
108 | }
109 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/AbstractGenerator/Command.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Abstracta.Generators.Framework.AbstractGenerator
5 | {
6 | internal class Command
7 | {
8 | internal Command(string name, string type, string desc, List requestIds, Dictionary parameters)
9 | {
10 | Name = name;
11 | Type = type;
12 | Desc = desc;
13 | RequestIds = requestIds;
14 | Parameters = parameters;
15 | }
16 |
17 | internal string Name { get; private set; }
18 | internal string Type { get; private set; }
19 | internal string Desc { get; private set; }
20 | internal List RequestIds { get; private set; }
21 | internal Dictionary Parameters { get; private set; }
22 |
23 | internal static ParametersType GetParamFromName(string parameterName)
24 | {
25 | switch (parameterName.Trim())
26 | {
27 | case "Stop Execution":
28 | return ParametersType.StopExecution;
29 | case "Text":
30 | return ParametersType.TextToValidate;
31 | case "Negate Validation":
32 | return ParametersType.NegateValidation;
33 | case "Error Description":
34 | return ParametersType.ErrorDescription;
35 | case "Url":
36 | return ParametersType.Url;
37 | case "Element":
38 | return ParametersType.HTMLElement;
39 | case "Table":
40 | return ParametersType.Table;
41 | case "Link":
42 | return ParametersType.Link;
43 | case "Input":
44 | return ParametersType.Input;
45 | case "Value":
46 | return ParametersType.Value;
47 | case "Parameters":
48 | return ParametersType.Parameters;
49 | case "Target DataPool":
50 | return ParametersType.TargetDataPool;
51 | case "Combo":
52 | return ParametersType.Combo;
53 | case "User":
54 | return ParametersType.User;
55 | case "Password":
56 | return ParametersType.Password;
57 | case "Object Name":
58 | return ParametersType.ObjectName;
59 | case "Aditional Parameters":
60 | return ParametersType.AditionalParameters;
61 | case "Menu":
62 | return ParametersType.Menu;
63 | case "Variable":
64 | return ParametersType.Variable;
65 | default:
66 | throw new Exception("ParameterName unknown: " + parameterName);
67 | }
68 | }
69 | }
70 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/AbstractGenerator/DataPool.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Abstracta.Generators.Framework.AbstractGenerator
4 | {
5 | internal class DataPool
6 | {
7 | private readonly List _columns;
8 |
9 | public DataPool(string name, string fileName, List columns)
10 | {
11 | FileName = fileName;
12 | Name = name;
13 | _columns = columns;
14 | }
15 |
16 | public string Name { get; private set; }
17 |
18 | public string FileName { get; private set; }
19 |
20 | public List Columns()
21 | {
22 | return _columns;
23 | }
24 |
25 | public string ColumnsJoined(string separator)
26 | {
27 | return string.Join(separator, _columns.ToArray());
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/AbstractGenerator/HTTPRequest.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using Abstracta.FiddlerSessionComparer;
4 | using Abstracta.Generators.Framework.AbstractGenerator.ParameterExtractor;
5 | using Abstracta.Generators.Framework.AbstractGenerator.Validations;
6 | using Abstracta.Generators.Framework.JMeterGenerator.ParameterExtractor;
7 | using Fiddler;
8 |
9 | namespace Abstracta.Generators.Framework.AbstractGenerator
10 | {
11 | internal class HTTPRequest
12 | {
13 | private Session _request;
14 |
15 | internal Page InfoPage;
16 |
17 | internal Session FiddlerSession
18 | {
19 | get { return _request; }
20 | set
21 | {
22 | _request = value;
23 |
24 | RefererURL = value.fullUrl;
25 | HTTPRCode = value.responseCode;
26 | }
27 | }
28 |
29 | internal int HTTPRCode { get; private set; }
30 |
31 | ///
32 | /// URL used to compare with the 'referer' HTTP header of other HTTP requests
33 | ///
34 | internal string RefererURL { get; private set; }
35 |
36 | internal List Validations { get; private set; }
37 |
38 | internal List ParametersToExtract { get; private set; }
39 |
40 | internal List ParametersToUse { get; private set; }
41 |
42 | internal HTTPRequest()
43 | {
44 | Validations = new List();
45 | ParametersToExtract = new List();
46 | ParametersToUse = new List();
47 | }
48 |
49 | internal HTTPRequest(Session request)
50 | {
51 | FiddlerSession = request;
52 | Validations = new List();
53 | ParametersToExtract = new List();
54 | ParametersToUse = new List();
55 | }
56 |
57 | internal HTTPRequest(Session request, Page infoPage)
58 | {
59 | InfoPage = infoPage;
60 | FiddlerSession = request;
61 | Validations = new List();
62 | ParametersToExtract = new List();
63 | ParametersToUse = new List();
64 | }
65 |
66 | internal HTTPRequest(List validations)
67 | {
68 | Validations = validations;
69 | ParametersToExtract = new List();
70 | ParametersToUse = new List();
71 | }
72 |
73 | internal HTTPRequest(Session request, List validations)
74 | {
75 | FiddlerSession = request;
76 | Validations = validations;
77 | ParametersToExtract = new List();
78 | ParametersToUse = new List();
79 | }
80 |
81 | internal void AddParameterToExtract(JMeterRegExParameter newParam)
82 | {
83 | ParametersToExtract.Add(newParam);
84 | }
85 |
86 | internal string GetFullURL(Page infoPage)
87 | {
88 | if (infoPage != null)
89 | {
90 | return infoPage.FullURL;
91 | }
92 |
93 | var result = _request.fullUrl;
94 |
95 | foreach (var param in ParametersToUse.Where(p => p.UseParameterIn.Contains(UseIn.Url)))
96 | {
97 | result = result.Replace(param.ValueToReplace, "${" + param.VariableName + "}");
98 | }
99 |
100 | return result;
101 | }
102 |
103 | internal static string ClearParametersFromURL(string url)
104 | {
105 | if (url == null)
106 | {
107 | return null;
108 | }
109 |
110 | var indexOf = url.IndexOf('?');
111 | return indexOf < 0 ? url : url.Remove(indexOf);
112 | }
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/AbstractGenerator/ParameterExtractor/AbstractParameterExtractor.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Abstracta.Generators.Framework.AbstractGenerator.ParameterExtractor
4 | {
5 | public enum ExtractFrom { Body, Headers, Url }
6 | public enum UseIn { Body, Url }
7 |
8 | internal abstract class AbstractParameterExtractor
9 | {
10 | internal string VariableName { get; private set; }
11 |
12 | internal string ValueToReplace { get; private set; }
13 |
14 | internal string Description { get; private set; }
15 |
16 | internal ExtractFrom ExtractParameterFrom { get; private set; }
17 |
18 | internal List UseParameterIn { get; private set; }
19 |
20 | protected AbstractParameterExtractor(ExtractFrom extractParameterFrom, List useParameterIn, string variableName, string valueToReplace, string description)
21 | {
22 | ExtractParameterFrom = extractParameterFrom;
23 | UseParameterIn = useParameterIn;
24 | VariableName = variableName;
25 | ValueToReplace = valueToReplace;
26 | Description = description;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/AbstractGenerator/ParameterExtractor/AbstractRegExParameter.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Abstracta.Generators.Framework.AbstractGenerator.ParameterExtractor
4 | {
5 | internal abstract class AbstractRegExParameter : AbstractParameterExtractor
6 | {
7 | internal string RegularExpression { get; set; }
8 |
9 | internal string Group { get; set; }
10 |
11 | protected AbstractRegExParameter(ExtractFrom extractParameterFrom, List useParameterIn, string variableName, string regularExpression, string group, string valueToReplace, string description)
12 | : base(extractParameterFrom, useParameterIn, variableName, valueToReplace, description)
13 | {
14 | RegularExpression = regularExpression;
15 | Group = group;
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/AbstractGenerator/ParameterExtractor/NameGenerator.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.AbstractGenerator.ParameterExtractor
2 | {
3 | internal class NameGenerator
4 | {
5 | private static volatile NameGenerator _instance;
6 |
7 | private static readonly object Lock = new object();
8 |
9 | private static int _id = -1;
10 |
11 | internal static NameGenerator GetInstance()
12 | {
13 | if (_instance == null)
14 | {
15 | lock (Lock)
16 | {
17 | if (_instance == null)
18 | {
19 | _instance = new NameGenerator();
20 | }
21 | }
22 | }
23 |
24 | return _instance;
25 | }
26 |
27 | internal string GetNewName()
28 | {
29 | return "URL_Params_Generator_" + ++_id;
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/AbstractGenerator/ParametersType.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.AbstractGenerator
2 | {
3 | internal enum ParametersType
4 | {
5 | StopExecution,
6 | NegateValidation,
7 | TextToValidate,
8 | ErrorDescription,
9 | Url,
10 | HTMLElement,
11 | Table,
12 | Link,
13 | Input,
14 | Value,
15 | Parameters,
16 | TargetDataPool,
17 | Combo,
18 | User,
19 | Password,
20 | ObjectName,
21 | AditionalParameters,
22 | Menu,
23 | Variable,
24 | }
25 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/AbstractGenerator/Validations/AbstractValidation.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.AbstractGenerator.Validations
2 | {
3 | internal abstract class AbstractValidation
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/AbstractGenerator/Validations/AppearTextValidation.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.AbstractGenerator.Validations
2 | {
3 | internal class AppearTextValidation : AbstractValidation
4 | {
5 | internal string TextToValidate { get; private set; }
6 |
7 | internal string ErrorDescription { get; private set; }
8 |
9 | internal bool NegateValidation { get; private set; }
10 |
11 | internal bool StopExecution { get; private set; }
12 |
13 | internal AppearTextValidation(string text, string errDesc, bool negate, bool stop)
14 | {
15 | TextToValidate = text;
16 | ErrorDescription = errDesc;
17 | NegateValidation = negate;
18 | StopExecution = stop;
19 | }
20 |
21 | public override string ToString()
22 | {
23 | var result = "if ( '" + TextToValidate + "' IS " + (!NegateValidation ? "NOT " : string.Empty) +
24 | "in last response)\n";
25 |
26 | result += "\t\t{\n\t\t\tERROR: " + ErrorDescription + "\n" + (StopExecution ? "\t\t\tSTOP Execution;\n" : string.Empty) + "\t\t}";
27 |
28 | return result;
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/AbstractGenerator/Validations/CheckMainObjectValidation.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.AbstractGenerator.Validations
2 | {
3 | internal class CheckMainObjectValidation : AbstractValidation
4 | {
5 | internal string ObjectName { get; private set; }
6 |
7 | internal CheckMainObjectValidation(string objetctName)
8 | {
9 | ObjectName = objetctName;
10 | }
11 |
12 | public override string ToString()
13 | {
14 | return "CheckMainObject: " + ObjectName;
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/AbstractGenerator/Validations/DefaultValidation.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.AbstractGenerator.Validations
2 | {
3 | internal class DefaultValidation : AbstractValidation
4 | {
5 | public override string ToString()
6 | {
7 | return "DEFAULT VALIDATION";
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/AbstractGenerator/Validations/ResponseCodeValidation.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.AbstractGenerator.Validations
2 | {
3 | internal class ResponseCodeValidation : AbstractValidation
4 | {
5 | internal int ResponseCodeValidate { get; private set; }
6 |
7 | internal string ErrorDescription { get; private set; }
8 |
9 | internal bool NegateValidation { get; private set; }
10 |
11 | internal bool StopExecution { get; private set; }
12 |
13 | internal ResponseCodeValidation(int responseCodeValidation, string errDesc = "", bool negate = false, bool stop = true)
14 | {
15 | ResponseCodeValidate = responseCodeValidation;
16 | ErrorDescription = errDesc;
17 | NegateValidation = negate;
18 | StopExecution = stop;
19 | }
20 |
21 | public override string ToString()
22 | {
23 | var result = "if ( '" + ResponseCodeValidate + "' IS " + (!NegateValidation ? "NOT " : string.Empty) +
24 | "the response code)\n";
25 |
26 | result += "\t\t{\n\t\t\tERROR: " + ErrorDescription + "\n" + (StopExecution ? "\t\t\tSTOP Execution;\n" : string.Empty) + "\t\t}";
27 |
28 | return result;
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/AbstractGenerator/Wrappers/FiddlerSessionsWrapper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Fiddler;
3 |
4 | namespace Abstracta.Generators.Framework.AbstractGenerator.Wrappers
5 | {
6 | internal class FiddlerSessionsWrapper
7 | {
8 | private readonly Session[] _sessions;
9 |
10 | internal FiddlerSessionsWrapper(Session[] fiddlerSessions)
11 | {
12 | _sessions = fiddlerSessions;
13 | }
14 |
15 | internal Session GetRequest(int requestId)
16 | {
17 | if (requestId < 0)
18 | {
19 | throw new Exception("Out of index when accessing fiddler sessions: " + requestId);
20 | }
21 |
22 | if (requestId >= _sessions.Length)
23 | {
24 | throw new Exception("Out of index when accessing fiddler sessions: " + requestId);
25 | }
26 |
27 | return _sessions[requestId];
28 | }
29 |
30 | internal Session[] GetSessions()
31 | {
32 | var res = new Session[_sessions.Length];
33 |
34 | for (var i = 0; i < _sessions.Length; i++)
35 | {
36 | res[i] = _sessions[i];
37 | }
38 |
39 | return res;
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/Constants/HTTPConstants.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.Constants
2 | {
3 | internal class HTTPConstants
4 | {
5 | internal const string DefaultPortStr = "80";
6 |
7 | internal const string VariableNameServer = "server";
8 |
9 | internal const string VariableNamePort = "port";
10 |
11 | internal const string VariableNameWebApp = "webApp";
12 |
13 | internal const string VariableNameDebug = "debug";
14 |
15 | internal const string VariableLogFails = "logFails_enable";
16 |
17 | internal const int DefaultPort = 80;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/JMeterGenerator/AuxiliarClasses/CommonArgumentTypes.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.JMeterGenerator.AuxiliarClasses
2 | {
3 | internal enum CommonArgumentTypes
4 | {
5 | Paths,
6 | ThinkTimes,
7 | HTTPHeaders,
8 | }
9 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/JMeterGenerator/AuxiliarClasses/CommonCollectorTypes.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.JMeterGenerator.AuxiliarClasses
2 | {
3 | internal enum CommonCollectorTypes
4 | {
5 | ResultsXMLFile,
6 | ResultsLogFile,
7 | AggregateReport,
8 | ViewResultsInTable,
9 | ViewResultsTree,
10 | ResponseTimeGraph,
11 | }
12 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/JMeterGenerator/AuxiliarClasses/ThinktimeType.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.JMeterGenerator.AuxiliarClasses
2 | {
3 | internal enum ThinktimeType
4 | {
5 | Low,
6 | Medium,
7 | Large
8 | }
9 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/JMeterGenerator/ParameterExtractor/JMeterConstant.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.JMeterGenerator.ParameterExtractor
2 | {
3 | internal class JMeterConstant
4 | {
5 | internal string Name { get; set; }
6 |
7 | internal string Value { get; set; }
8 |
9 | internal string Description { get; set; }
10 |
11 | public JMeterConstant(string name, string value, string description)
12 | {
13 | Name = name;
14 | Value = value;
15 | Description = description;
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/JMeterGenerator/ParameterExtractor/JMeterRegExParameter.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.IO;
3 | using System.Xml;
4 | using Abstracta.Generators.Framework.AbstractGenerator.ParameterExtractor;
5 | using Abstracta.Generators.Framework.JMeterGenerator.AuxiliarClasses;
6 |
7 | namespace Abstracta.Generators.Framework.JMeterGenerator.ParameterExtractor
8 | {
9 | internal class JMeterRegExParameter : AbstractRegExParameter
10 | {
11 | internal JMeterRegExParameter(ExtractFrom extractParameterFrom, List useParameterIn, string variableName, string regularExpression, string group, string valueToReplace, string description)
12 | : base(extractParameterFrom, useParameterIn, variableName, regularExpression, group, valueToReplace, description)
13 | {
14 | }
15 |
16 | public override string ToString()
17 | {
18 | /*
19 |
20 | commmmmmmmeent
21 | false
22 | URL_Params1
23 | "historiaclinicaprincipalv2\?([^"]+)"
24 | $1$
25 | NOT FOUND
26 | 1
27 |
28 | * */
29 |
30 | string result;
31 | var useHeaders = "false";
32 | switch (ExtractParameterFrom)
33 | {
34 | case ExtractFrom.Headers:
35 | useHeaders = "true";
36 | break;
37 | case ExtractFrom.Url:
38 | useHeaders = "URL";
39 | break;
40 | }
41 |
42 | using (var stream = new MemoryStream())
43 | {
44 | // Create an XMLWriter object
45 | var xmlWriter = new XmlTextWriter(stream, System.Text.Encoding.UTF8)
46 | {
47 | Formatting = Formatting.Indented
48 | };
49 |
50 | JMeterWrapper.WriteStartElement(xmlWriter, "RegexExtractor", "RegexExtractorGui", "RegexExtractor", "RegExp Extractor - " + VariableName, "true");
51 | JMeterWrapper.WriteElementWithTextChildren(xmlWriter, "stringProp", "TestPlan.comments", Description);
52 | JMeterWrapper.WriteElementWithTextChildren(xmlWriter, "stringProp", "RegexExtractor.useHeaders", useHeaders);
53 | JMeterWrapper.WriteElementWithTextChildren(xmlWriter, "stringProp", "RegexExtractor.refname", VariableName);
54 | JMeterWrapper.WriteElementWithTextChildren(xmlWriter, "stringProp", "RegexExtractor.regex", RegularExpression);
55 | JMeterWrapper.WriteElementWithTextChildren(xmlWriter, "stringProp", "RegexExtractor.template", Group);
56 | JMeterWrapper.WriteElementWithTextChildren(xmlWriter, "stringProp", "RegexExtractor.default", "NOT FOUND");
57 | JMeterWrapper.WriteElementWithTextChildren(xmlWriter, "stringProp", "RegexExtractor.match_number", "1");
58 |
59 | //
60 | xmlWriter.WriteEndElement();
61 |
62 | xmlWriter.WriteStartElement("hashTree");
63 | xmlWriter.WriteEndElement();
64 |
65 | xmlWriter.Flush();
66 |
67 | stream.Position = 0;
68 | var streamReader = new StreamReader(stream);
69 | result = streamReader.ReadToEnd();
70 | }
71 |
72 | return result;
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/JMeterGenerator/Step.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.IO;
3 | using System.Xml;
4 | using Abstracta.FiddlerSessionComparer;
5 | using Abstracta.Generators.Framework.AbstractGenerator;
6 | using Abstracta.Generators.Framework.AbstractGenerator.ParameterExtractor;
7 | using Abstracta.Generators.Framework.AbstractGenerator.Validations;
8 | using Abstracta.Generators.Framework.JMeterGenerator.AuxiliarClasses;
9 | using Abstracta.Generators.Framework.JMeterGenerator.ParameterExtractor;
10 | using Fiddler;
11 | using ExtractFrom = Abstracta.Generators.Framework.AbstractGenerator.ParameterExtractor.ExtractFrom;
12 | using Formatting = System.Xml.Formatting;
13 |
14 | namespace Abstracta.Generators.Framework.JMeterGenerator
15 | {
16 | internal class Step : AbstractStep
17 | {
18 | protected override AbstractRegExParameter CreateRegExpExtractorToGetRedirectParameters(ExtractFrom extractParameterFrom, List useParameterIn, string varName, string expression, string group, string valueToReplace, string description)
19 | {
20 | return new JMeterRegExParameter(extractParameterFrom, useParameterIn, varName, expression, group, valueToReplace, description);
21 | }
22 |
23 | protected override AbstractPageRequest CreatePageRequest(Session primaryRequest, AbstractStep abstractStep, Page page, bool sencodary = true, bool beanShell = true, bool gxApp = false)
24 | {
25 | return new PageRequest(primaryRequest, abstractStep, page, sencodary, beanShell, gxApp);
26 | }
27 |
28 | internal override DefaultValidation CreateDefaultValidation()
29 | {
30 | return new Validations.DefaultValidation();
31 | }
32 |
33 | internal override CheckMainObjectValidation CreateCheckMainObjectValidation(string objectName)
34 | {
35 | return new Validations.CheckMainObjectValidation(objectName);
36 | }
37 |
38 | internal override AppearTextValidation CreateAppearTextValidation(string text, string desc, bool neg, bool stop)
39 | {
40 | return new Validations.AppearTextValidation(text, desc, neg, stop);
41 | }
42 |
43 | internal override ResponseCodeValidation CreateResponseCodeValidation(int responseCode, string desc = "", bool neg = false, bool stop = true)
44 | {
45 | return new Validations.ResponseCodeValidation(responseCode, desc, neg, stop);
46 | }
47 |
48 | public override string ToString()
49 | {
50 | //
51 | // false
52 | // Go( "http://localhost/CursoGXtest.NetEnvironment/home.aspx" )
53 | //
54 |
55 | string result;
56 |
57 | using (var stream = new MemoryStream())
58 | {
59 | // Create an XMLWriter object
60 | var xmlWriter = new XmlTextWriter(stream, System.Text.Encoding.UTF8)
61 | {
62 | Formatting = Formatting.Indented
63 | };
64 |
65 | JMeterWrapper.WriteStartElement(xmlWriter, "TransactionController", "TransactionControllerGui",
66 | "TransactionController", Name, "true");
67 | JMeterWrapper.WriteElementWithTextChildren(xmlWriter, "boolProp", "TransactionController.parent", "false");
68 | JMeterWrapper.WriteElementWithTextChildren(xmlWriter, "stringProp", "TestPlan.comments", Desc);
69 | JMeterWrapper.WriteElementWithTextChildren(xmlWriter, "boolProp", "TransactionController.includeTimers", "false");
70 | xmlWriter.WriteEndElement();
71 |
72 | xmlWriter.WriteStartElement("hashTree");
73 |
74 | foreach (var pageRequest in Requests)
75 | {
76 | xmlWriter.WriteRaw(pageRequest.ToString());
77 | }
78 |
79 | //
80 | xmlWriter.WriteEndElement();
81 | xmlWriter.Flush();
82 |
83 | stream.Position = 0;
84 | var streamReader = new StreamReader(stream);
85 | result = streamReader.ReadToEnd();
86 | }
87 |
88 | return result;
89 | }
90 | }
91 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/JMeterGenerator/Validations/AppearTextValidation.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.JMeterGenerator.Validations
2 | {
3 | internal class AppearTextValidation : AbstractGenerator.Validations.AppearTextValidation
4 | {
5 | internal AppearTextValidation(string text, string errDesc, bool negate, bool stop) : base(text, errDesc, negate, stop)
6 | {
7 | }
8 |
9 | public override string ToString()
10 | {
11 | var titleName = (NegateValidation)
12 | ? "Appear Text Validation (negated): " + TextToValidate
13 | : "Appear Text Validation: " + TextToValidate;
14 | var assertionsTestType = (NegateValidation) ? "6" : "2";
15 |
16 | return ValidationHelper.CreateValidation(titleName, TextToValidate, assertionsTestType, ErrorDescription);
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/JMeterGenerator/Validations/CheckMainObjectValidation.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.JMeterGenerator.Validations
2 | {
3 | internal class CheckMainObjectValidation : AbstractGenerator.Validations.CheckMainObjectValidation
4 | {
5 | internal CheckMainObjectValidation(string objetctName) : base(objetctName)
6 | {
7 | }
8 |
9 | public override string ToString()
10 | {
11 | return ValidationHelper.CreateValidation("Check main object: " + ObjectName, ObjectName, "2");
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/JMeterGenerator/Validations/DefaultValidation.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.JMeterGenerator.Validations
2 | {
3 | internal class DefaultValidation : AbstractGenerator.Validations.DefaultValidation
4 | {
5 | public override string ToString()
6 | {
7 | return ValidationHelper.CreateValidation("Response Assert - ", "TEXT TO VALIDATE", "2");
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/JMeterGenerator/Validations/ResponseCodeValidation.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.JMeterGenerator.Validations
2 | {
3 | internal class ResponseCodeValidation : AbstractGenerator.Validations.ResponseCodeValidation
4 | {
5 | internal ResponseCodeValidation(int responseCodeValidation, string errDesc = "", bool negate = false, bool stop = true)
6 | : base(responseCodeValidation, errDesc, negate, stop)
7 | {
8 | }
9 |
10 | public override string ToString()
11 | {
12 | var titleName = (NegateValidation)
13 | ? "Response Code Validation (negated): " + ResponseCodeValidate
14 | : "Response Code Validation: " + ResponseCodeValidate;
15 | var assertionsTestType = (NegateValidation) ? "12" : "8";
16 |
17 | return ValidationHelper.CreateResponseCodeValidation(titleName, ResponseCodeValidate, assertionsTestType, ErrorDescription);
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/Logger.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 |
3 | namespace Abstracta.Generators.Framework
4 | {
5 | internal class Logger
6 | {
7 | private static volatile Logger _instance;
8 | private static readonly object Lock = new object();
9 |
10 | private const string FileName = "ScriptGenerator_Logger.txt";
11 |
12 | internal static Logger GetInstance()
13 | {
14 | if (_instance == null)
15 | {
16 | lock (Lock)
17 | {
18 | if (_instance == null)
19 | {
20 | _instance = new Logger();
21 | }
22 | }
23 | }
24 | return _instance;
25 | }
26 |
27 | internal void Log(object log)
28 | {
29 | using (var file = new StreamWriter(FileName, true))
30 | {
31 | file.WriteLine(System.DateTime.Now + " - " + log);
32 | }
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/DataFile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 |
5 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses
6 | {
7 | // tiene un nombre y un contenido
8 | internal class DataFile
9 | {
10 | //para separar un dato de otro en las líneas de un archivo de datos
11 | //esto es luego útil para la función parse_string de OpenSTA
12 | internal const string Separator = ",";
13 |
14 | /* PUBLIC GETTERS AND SETTERS */
15 | internal string Name { get; private set; }
16 |
17 | internal Dictionary Columns { get; set; }
18 |
19 | /* CONSTRUCTORS */
20 | internal DataFile(string name)
21 | {
22 | Name = name;
23 | Columns = new Dictionary();
24 | }
25 |
26 | internal DataFile(string name, ICollection> columns, IEnumerable values)
27 | {
28 | Name = name;
29 | Columns = new Dictionary();
30 |
31 | var columnaValores = new List[columns.Count];
32 | for (var i = 0; i < columns.Count; i++)
33 | {
34 | columnaValores[i] = new List();
35 | }
36 |
37 | foreach (var fila in values)
38 | {
39 | var valoresSeparados = fila.Split(Separator.ToCharArray());
40 | if (valoresSeparados.Length != columns.Count)
41 | {
42 | throw new Exception("Error en datos (distintas columnas que valores en el archivo");
43 | }
44 |
45 | for (var i = 0; i < columns.Count; i++)
46 | {
47 | columnaValores[i].Add(valoresSeparados[i]);
48 | }
49 | }
50 |
51 | var n = 0;
52 | foreach (var col in columns)
53 | {
54 | AddColumn(col.Key, col.Value, columnaValores[n]);
55 | n++;
56 | }
57 | }
58 |
59 | internal void AddColumn(string fileColmumn, Variable varible, string value)
60 | {
61 | if (!Columns.ContainsKey(fileColmumn))
62 | {
63 | Columns.Add(fileColmumn, new DataFileColumn(fileColmumn, varible.Name, value));
64 | }
65 | }
66 |
67 | internal void AddColumn(string fileColmumn, Variable varible, List values)
68 | {
69 | if (!Columns.ContainsKey(fileColmumn))
70 | {
71 | Columns.Add(fileColmumn, new DataFileColumn(fileColmumn, varible.Name, values));
72 | }
73 | }
74 |
75 | internal void Write(string folder)
76 | {
77 | if (!folder.EndsWith("\\") || !folder.EndsWith("/"))
78 | {
79 | folder = folder + "\\";
80 | }
81 |
82 | var filePath = folder + Name + ".fvr";
83 |
84 | if (File.Exists(filePath))
85 | {
86 | return;
87 | }
88 |
89 | var line0 = string.Empty;
90 |
91 | IEnumerator enumerator = Columns.Values.GetEnumerator();
92 | enumerator.MoveNext();
93 |
94 | var cantValues = enumerator.Current.Values.Count;
95 |
96 | for (var i = 0; i < cantValues; i++)
97 | {
98 | foreach (var col in Columns.Values)
99 | {
100 | line0 += col.Values[i] + Separator;
101 | }
102 |
103 | line0 = line0.Substring(0, line0.Length - Separator.Length) + Environment.NewLine;
104 | }
105 |
106 | using (var file = new StreamWriter(filePath))
107 | {
108 | file.Write(line0);
109 | }
110 | }
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/DataFileColumn.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses
4 | {
5 | internal class DataFileColumn
6 | {
7 | public string Name { get; set; }
8 | public List Values { get; set; }
9 | public string VariableName { get; set; }
10 |
11 | public DataFileColumn(string name, string variable, string value)
12 | {
13 | Name = name;
14 | VariableName = variable;
15 | Values = new List {value};
16 | }
17 |
18 | public DataFileColumn(string name, string variable, List values)
19 | {
20 | Name = name;
21 | VariableName = variable;
22 | Values = values;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/ParametrizedValue.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses
2 | {
3 | internal class ParametrizedValue
4 | {
5 | public string HTMLElement { get; set; }
6 | public string HTMLElementValue { get; set; }
7 | public Variable Var { get; set; }
8 |
9 | public ParametrizedValue(string htmlElement, string htmlValue, Variable vari)
10 | {
11 | HTMLElement = htmlElement;
12 | HTMLElementValue = htmlValue;
13 | Var = vari;
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/SCLSnippets/AppearTextSection.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.SCLSnippets
2 | {
3 | internal class AppearTextSection : ISCLSections
4 | {
5 | #region ISCLSections Members
6 |
7 | public string Text { get; set; }
8 | public int ConnectionID { get; set; }
9 | private string _code = "";
10 | public string StepName { get; set; }
11 | public bool Negation { get; set; }
12 | public bool Body { get; set; }
13 |
14 | public AppearTextSection(string text, int connectionID, string stepName)
15 | {
16 | Text = text;
17 | ConnectionID = connectionID;
18 | StepName = stepName;
19 | Negation = false;
20 | Body = true;
21 | }
22 |
23 | public string WriteCode()
24 | {
25 | var negationStr = Negation ? "Not" : "";
26 | var source = Body ? "Body" : "Header";
27 | var sourceFriendly = Body ? "Page" : "Header";
28 |
29 | _code = string.Format("!-----------------------------------------------------------\n" +
30 | "!============ Check if text: " + Text + " appears in {5}--------\n" +
31 | "!-----------------------------------------------------------\n" +
32 | "Set buffer=''\n" +
33 | "Set StepName = \"{0} \n" +
34 | "Set expectedResponse = \"{1}\" \n" +
35 | "Load Response_Info {4} ON {2} Into buffer\n" +
36 | "Include \"{3}AppearText.inc\"\n" +
37 | "!-----------------------------------------------------------\n",
38 | StepName, Text, ConnectionID, negationStr, source, sourceFriendly);
39 |
40 | return _code;
41 | }
42 |
43 | #endregion
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/SCLSnippets/BuildBlobFromBlobSection.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.SCLSnippets
2 | {
3 | internal class BuildBlobFromBlobSection : ISCLSections
4 | {
5 | public Variable Blob { get; set; }
6 |
7 | public BuildBlobFromBlobSection(Variable blob)
8 | {
9 | Blob = blob;
10 | }
11 |
12 | public string WriteCode()
13 | {
14 | return
15 | @" BUILD AUTHENTICATION BLOB &
16 | FOR NTLM &
17 | FROM BLOB " + Blob.Name + @" &
18 | INTO " + Blob.Name;
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/SCLSnippets/BuildBlobFromUserSection.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.SCLSnippets
2 | {
3 | internal class BuildBlobFromUserSection : ISCLSections
4 | {
5 | public string User { get; set; }
6 | public string Password { get; set; }
7 | public string Domain { get; set; }
8 | public int ConnectionID { get; set; }
9 |
10 | public static string AutenticationMode { get; set; }
11 |
12 | public BuildBlobFromUserSection(string user, string pwd, string domain, int connID)
13 | {
14 | User = user;
15 | Password = pwd;
16 | Domain = domain;
17 | ConnectionID = connID;
18 | }
19 |
20 |
21 | public string WriteCode()
22 | {
23 | // NP - 17/01/2014
24 | // si AuthenticationMode es null le pongo Basic y salimos de esta ;)
25 | if (AutenticationMode == null)
26 | AutenticationMode = "Basic";
27 | return
28 | @"BUILD AUTHENTICATION BLOB&
29 | FOR "+AutenticationMode+@" &
30 | FROM USER " + User + " PASSWORD " + Password + " DOMAIN " + Domain + " &\nINTO blob1\n\n";
31 | }
32 |
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/SCLSnippets/CodeSection.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.SCLSnippets
2 | {
3 | internal class CodeSection : ISCLSections
4 | {
5 | //string code = string.Format("Code \n" +
6 | // "\t !Read in the default browser user agent field \n" +
7 | // "\t Entry[USER_AGENT,USE_PAGE_TIMERS] \n");
8 | #region ISCLSections Members
9 |
10 |
11 | public string WriteCode()
12 | {
13 | return string.Format("Code \n" +
14 | "\t !Read in the default browser user agent field \n" +
15 | "\t Entry[USER_AGENT,USE_PAGE_TIMERS] \n\n{0}",appendedText);
16 | }
17 |
18 | #endregion
19 |
20 | private string appendedText = "";
21 | internal void AppendText(string p)
22 | {
23 | appendedText += p;
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/SCLSnippets/Comment.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.SCLSnippets
2 | {
3 | internal class Comment : ISCLSections
4 | {
5 | public string CommentStr { get; set; }
6 |
7 | public Comment(string comment)
8 | {
9 | CommentStr = comment;
10 | }
11 |
12 | public string WriteCode()
13 | {
14 | //fijarse que si el largo maximo es mayor al largo maximo de linea se tiene que poner en dos lineas
15 | //si es vacio no imprimir nada
16 | var aux = OpenSTAUtils.SplitCommentIfNecesary(CommentStr);
17 | if (!aux.StartsWith("!"))
18 | {
19 | aux = "!" + aux;
20 | }
21 |
22 | return aux;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/SCLSnippets/ConstantDeclarationSection.cs:
--------------------------------------------------------------------------------
1 | using Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.Scripts;
2 |
3 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.SCLSnippets
4 | {
5 | internal class ConstantDeclarationSection : ISCLSections
6 | {
7 | public string Name { get; set; }
8 |
9 | public string Value { get; set; }
10 |
11 | public ConstantDeclarationSection(string name, string value)
12 | {
13 | Name = name;
14 | Value = value;
15 | }
16 |
17 | public string WriteCode()
18 | {
19 | int valor;
20 | string result;
21 | if (int.TryParse(Value, out valor))
22 | {
23 | result = string.Format("CONSTANT {0} = {1}\n", Name, Value);
24 | }
25 | else
26 | {
27 | var aux = OpenSTAUtils.SplitIfNecesary(Value, "\"", "\"&", ScriptSCL.MaxLineLengh);
28 | result = string.Format("CONSTANT {0} = {1}\"\n", Name, aux);
29 | }
30 | return result;
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/SCLSnippets/EndTimer.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.SCLSnippets
2 | {
3 | internal class EndTimer : ISCLSections
4 | {
5 | public string TimerName { get; set; }
6 |
7 | public EndTimer(string timerName)
8 | {
9 | TimerName = OpenSTAUtils.RenameVariableIfNeccesary(timerName);
10 | }
11 |
12 | public string WriteCode()
13 | {
14 | return string.Format("Disconnect All\nEnd Timer {0}\n", TimerName);
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/SCLSnippets/EnviromentSection.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.SCLSnippets
2 | {
3 | internal class EnviromentSection : ISCLSections
4 | {
5 | private readonly string _code;
6 |
7 | public EnviromentSection(string dsc)
8 | {
9 | _code = string.Format("\nEnvironment\n" +
10 | "\t Description \"{0}\"\n" +
11 | "\t Mode \t HTTP \n" +
12 | "\t Wait \t UNIT MILLISECONDS \n\n",
13 | dsc);
14 | }
15 |
16 | public string WriteCode()
17 | {
18 | return _code;
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/SCLSnippets/HeaderSection.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.SCLSnippets
5 | {
6 | internal class HeaderSection : ISCLSections
7 | {
8 | // NP - 21/01/2014
9 | // Cambio la lista que almacen las variables por un diccionario para optimizar las búsquedas, que se realizaban en cada función
10 | private readonly IDictionary _variables = new Dictionary();
11 | private readonly IList _constants = new List();
12 |
13 | public HeaderSection(){
14 | //esto se puede poner en el global
15 | _variables.Add("USER_AGENT", new VariableDeclaration(new Variable("USER_AGENT", "CHARACTER*512", VariablesScopes.Local)));
16 | _variables.Add("MESSAGE", new VariableDeclaration(new Variable("MESSAGE", "CHARACTER*512", VariablesScopes.Local)));
17 | _variables.Add("USE_PAGE_TIMERS", new VariableDeclaration(new Variable("USE_PAGE_TIMERS", "Integer", VariablesScopes.Local)));
18 | }
19 |
20 | public void AddVariable(Variable var)
21 | {
22 | //si no existe la agrego
23 | if (_variables.ContainsKey(var.Name))
24 | {
25 | // NP 02/09/2013
26 | // se agrega el if del scope para arreglar el bug de que si el DataPool se llama igual que el TC no te agrega la definición de la variable del archivo
27 | // igual habría que cambiar la estructura que guarda las variables por un diccionario DONE
28 | if (_variables[var.Name].Variable.Scope == var.Scope)
29 | {
30 | return;
31 | }
32 |
33 | if (_variables.ContainsKey("DF_" + var.Name))
34 | {
35 | return;
36 | }
37 |
38 | var.Name = "DF_" + var.Name;
39 | }
40 |
41 | _variables.Add(var.Name, new VariableDeclaration(var));
42 | }
43 |
44 | public Variable GetVariable(string name)
45 | {
46 | return _variables.ContainsKey(name) ? _variables[name].Variable : null;
47 | }
48 |
49 | public bool ExistsVariable(string name)
50 | {
51 | return _variables.ContainsKey(name);
52 | }
53 |
54 | #region ISCLSections Members
55 |
56 | public string WriteCode()
57 | {
58 | var result =
59 | "Definitions \n" +
60 | "\t !Standard defines\n" +
61 | "\t Include \t\t \"RESPONSE_CODES.INC\"\n" +
62 | "\t Include \t\t \"GLOBAL_VARIABLES.INC\"\n" +
63 | "\t Include \t\t \"FunctionsVariables.INC\"\n\n"
64 | ;
65 |
66 | foreach (var cons in _constants)
67 | {
68 | result += cons.WriteCode();
69 | }
70 |
71 | //agrupar todos los timers
72 | var timers = string.Empty;
73 | var characters = string.Empty;
74 | var integers = string.Empty;
75 | var others = string.Empty;
76 | foreach (var pair in _variables)
77 | {
78 | var var = pair.Value;
79 | var aux = var.WriteCode();
80 | if (var.Variable.Type.ToLower().StartsWith("character"))
81 | {
82 | characters += aux;
83 | }
84 | else if (var.Variable.Type.ToLower().StartsWith("timer"))
85 | {
86 | timers += aux;
87 | }
88 | else if (var.Variable.Type.ToLower().StartsWith("integer"))
89 | {
90 | integers += aux;
91 | }
92 | else
93 | {
94 | others += aux;
95 | }
96 | }
97 |
98 | result += timers;
99 | result += characters;
100 | result += integers;
101 | result += others;
102 | return result;
103 | }
104 | #endregion
105 |
106 | internal void AddConstant(ConstantDeclarationSection constantDeclarationSection)
107 | {
108 | _constants.Add(constantDeclarationSection);
109 | }
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/SCLSnippets/ISCLSections.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.SCLSnippets
2 | {
3 | internal interface ISCLSections
4 | {
5 | string WriteCode();
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/SCLSnippets/IncludeSecondaryScript.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.SCLSnippets
2 | {
3 | internal class IncludeSecondaryScript : ISCLSections
4 | {
5 | public string PathScript { get; set; }
6 | public string NameScript { get; set; }
7 |
8 | public IncludeSecondaryScript(string pathScript)
9 | {
10 | PathScript = pathScript;
11 | NameScript =
12 | pathScript.Substring(pathScript.LastIndexOf("\\"), pathScript.Length - pathScript.LastIndexOf("\\"))
13 | .Replace("\\", "");
14 | }
15 |
16 | public string WriteCode()
17 | {
18 | return string.Format("Include \"{0}\" \n", NameScript);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/SCLSnippets/IncludedScriptSection.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.IO;
3 | using System.Linq;
4 | using Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.Scripts;
5 |
6 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.SCLSnippets
7 | {
8 | internal class IncludedScriptSection : ISCLSections
9 | {
10 | public string Name { get; set; }
11 |
12 | Repository _rep;
13 |
14 | public ScriptSCL ParentScript { get; set; }
15 |
16 | readonly List _sections = new List();
17 |
18 | public IncludedScriptSection(string name, Repository repo, ScriptSCL mainScript)
19 | {
20 | Name = name;
21 | _rep = repo;
22 | ParentScript = mainScript;
23 | _sections.Add(new PlainCode("!Browser:IE5 \n"));
24 | _sections.Add(new PlainCode("if (debug=\"0\") then\n"));
25 | }
26 |
27 | public string WriteCode()
28 | {
29 | _sections.Add(new PlainCode("endif"));
30 | var includedFile = _sections.Aggregate("", (current, sec) => current + sec.WriteCode());
31 |
32 | var largo = ParentScript.Name.Length;
33 | var folderName = ParentScript.Name.Replace(".htp", "");
34 | var fileFolderPath = ParentScript.OpenSTARep.IncludePath + "\\" + folderName + "\\";
35 | if (!Directory.Exists(fileFolderPath))
36 | {
37 | Directory.CreateDirectory(fileFolderPath);
38 | }
39 |
40 | var filePath = fileFolderPath + Name + ".htp";
41 | var file = new StreamWriter(filePath);
42 | file.Write(includedFile);
43 | file.Close();
44 | return "include \"" + ParentScript.Name.Replace(".htp", "") + "/" + Name + ".htp\"\n";
45 | }
46 |
47 | public void AddRequest(Fiddler.Session req, string stepName)
48 | {
49 | bool isPrimary = SessionUtils.IsPrimaryReq(req);
50 | var reqCode = new RequestSection(req, ParentScript, stepName, ParentScript.ParametrizedValues, isPrimary);
51 | _sections.Add(reqCode);
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/SCLSnippets/LoadCookieSection.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.SCLSnippets
2 | {
3 | internal class LoadCookieSection : ISCLSections
4 | {
5 | public string CookieName { get; set; }
6 | public string CookieVar { get; set; }
7 | public int ConnID { get; set; }
8 |
9 | public LoadCookieSection(string cookieName, string cookieVarName, int connectionID)
10 | {
11 | CookieName = cookieName;
12 | CookieVar = cookieVarName;
13 | ConnID = connectionID;
14 | }
15 |
16 | public string WriteCode()
17 | {
18 | return string.Format("Load Response_Info Header ON {0} & \n" +
19 | "\t Into {1}&\n" +
20 | "\t ,WITH \"Set-Cookie,{2}\"",
21 | ConnID, CookieVar, CookieName);
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/SCLSnippets/LogResponsesSection.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.SCLSnippets
2 | {
3 | internal class LogResponsesSection : ISCLSections
4 | {
5 | public int ConnectionID { get; set; }
6 |
7 | public LogResponsesSection(int connectionID)
8 | {
9 | ConnectionID = connectionID;
10 | }
11 |
12 | public string WriteCode()
13 | {
14 | /*
15 | * if (debug=1) then
16 | set buffer = ""
17 | * load Response_Info Body from Id into buffer
18 | * log buffer
19 | * set strHeader = ""
20 | * log Response_Info header from Id into strHeader
21 | * log strHeader
22 | * endif
23 | */
24 |
25 | return string.Format("\nIf (debug = \"1\") then \n" +
26 | "\t Load Response_Info Body ON {0} Into {1} \n" +
27 | "\t log {1} \n" +
28 | "\t Load Response_Info Header ON {0} Into {2} \n" +
29 | "\t log {2} \n" +
30 | "Endif \n\n", ConnectionID, "buffer", "strHeader");
31 |
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/SCLSnippets/PlainCode.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.SCLSnippets
2 | {
3 | internal class PlainCode : ISCLSections
4 | {
5 | private readonly string _plainCode;
6 |
7 | public PlainCode(string code)
8 | {
9 | _plainCode = code;
10 | }
11 |
12 | public string WriteCode()
13 | {
14 | //fijarse que si el largo maximo es mayor al largo maximo de linea se tiene que poner en dos lineas
15 | //return OpenSTAUtils.SplitStringIFNecesary( plainCode);
16 | return _plainCode;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/SCLSnippets/StartTimer.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.SCLSnippets
2 | {
3 | internal class StartTimer : ISCLSections
4 | {
5 | public string TimerName { get; set; }
6 |
7 | public StartTimer(string timerName)
8 | {
9 | TimerName = OpenSTAUtils.RenameVariableIfNeccesary(timerName);
10 | }
11 |
12 | public string WriteCode()
13 | {
14 | return string.Format("\nStart Timer {0}\n\n", TimerName);
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/SCLSnippets/ThinkTimeSection.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.SCLSnippets
2 | {
3 | internal class ThinkTimeSection : ISCLSections
4 | {
5 | public int Seconds { get; set; }
6 |
7 | public ThinkTimeSection(int seconds)
8 | {
9 | Seconds = seconds;
10 | }
11 |
12 | public string WriteCode()
13 | {
14 | //thnik time condicionado a debug
15 | return string.Format("if (debug=\"0\") then \n\tWait {0}\nendif\n", Seconds);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/SCLSnippets/VariableDeclaration.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.SCLSnippets
2 | {
3 | internal class VariableDeclaration : ISCLSections
4 | {
5 | public Variable Variable { get; set; }
6 | public VariableDeclaration(Variable var)
7 | {
8 | Variable = var;
9 | }
10 |
11 | public string WriteCode()
12 | {
13 | switch (Variable.Scope)
14 | {
15 | case VariablesScopes.Local:
16 | return string.Format("\t {0} \t {1} \n", Variable.Type, Variable.Name);
17 |
18 | case VariablesScopes.File:
19 | return string.Format("\t {0} \t {1} , FILE = \"{1}\", script\n", Variable.Type, Variable.Name);
20 |
21 | default:
22 | return string.Format("\t {0} \t {1},{2} \n\n", Variable.Type, Variable.Name, Variable.Scope);
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/Scripts/IScript.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.Scripts
2 | {
3 | internal interface IScript
4 | {
5 | void Save(string folder);
6 |
7 | string Name { get; set; }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/Scripts/IncludedScriptSCL.cs:
--------------------------------------------------------------------------------
1 | using Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.SCLSnippets;
2 |
3 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.Scripts
4 | {
5 | internal class IncludedScriptSCL : ScriptSCL
6 | {
7 | int _lastIncludedScript;
8 | readonly MainScriptSCL _script;
9 |
10 | public IncludedScriptSCL(string name, string author, Repository repo, MainScriptSCL script)
11 | : base(name, author, repo)
12 | {
13 | _script = script;
14 | }
15 |
16 | public override void AddVariable(Variable var)
17 | {
18 | _script.AddVariable(var);
19 | }
20 |
21 | public override Variable GetVariable(string varName)
22 | {
23 | return _script.GetVariable(varName);
24 | }
25 |
26 | public override void AddRequest(Fiddler.Session req, string stepName)
27 | {
28 | var isPrimary = SessionUtils.IsPrimaryReq(req);
29 | var reqCode = new RequestSection(req,this,stepName,ParametrizedValues, isPrimary);
30 | if (isPrimary)
31 | {
32 | Sections.Add(reqCode);
33 | }
34 | else
35 | {
36 | //Agrego un "include" para poner el pedido secundario
37 | var lastIncludeSection = Sections[Sections.Count - 1] as IncludedScriptSection;
38 | if (lastIncludeSection == null)
39 | {
40 | lastIncludeSection = new IncludedScriptSection(Name.Replace(".htp", "") + "_" + _lastIncludedScript, OpenSTARep, this);
41 | _lastIncludedScript++;
42 | Sections.Add(lastIncludeSection);
43 | }
44 |
45 | lastIncludeSection.AddRequest(req, stepName);
46 | }
47 | }
48 |
49 | public override void AddConstant(string name, string value)
50 | {
51 | _script.AddConstant(name, value);
52 | }
53 |
54 | public override string GetEndCode()
55 | {
56 | return string.Empty;
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/Scripts/ScriptInc.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.SCLSnippets;
3 |
4 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.Scripts
5 | {
6 | internal class ScriptInc : ScriptSCL
7 | {
8 | public ScriptInc(string name,string autor, Repository repo):base(name,autor,repo)
9 | {
10 | }
11 |
12 | public new void Save(string folder)
13 | {
14 | throw new NotImplementedException();
15 | }
16 |
17 | public override void AddVariable(Variable var)
18 | {
19 | throw new NotImplementedException();
20 | }
21 |
22 | public override Variable GetVariable(string varName)
23 | {
24 | return null;
25 | }
26 |
27 | public override void AddRequest(Fiddler.Session req, string stepName)
28 | {
29 | throw new NotImplementedException();
30 | }
31 |
32 | public override void AddConstant(string name, string value)
33 | {
34 | if (Constants.ContainsKey(name)) return;
35 |
36 | Constants.Add(name, value);
37 | Sections.Add(new ConstantDeclarationSection(name, value));
38 | }
39 |
40 | public override string GetEndCode()
41 | {
42 | return string.Empty;
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/Variable.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses
2 | {
3 | internal class Variable
4 | {
5 | public VariablesScopes Scope { get; set; }
6 | public string Name { get; set; }
7 | public string Type { get; set; }
8 |
9 | public Variable(string name, string type, VariablesScopes scope)
10 | {
11 | Name = OpenSTAUtils.RenameVariableIfNeccesary(name);
12 | Type = type;
13 | Scope = scope;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/AuxiliarClasses/VariablesScopes.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses
2 | {
3 | internal enum VariablesScopes
4 | {
5 | Local,
6 | Thread,
7 | Script,
8 | Global,
9 | File,
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/OpenSTAGenerator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using Abstracta.Generators.Framework.AbstractGenerator;
5 | using Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses;
6 | using Abstracta.Generators.Framework.OSTAGenerator.AuxiliarClasses.Scripts;
7 | using GxTest.Utils.EnumTypes;
8 |
9 | namespace Abstracta.Generators.Framework.OSTAGenerator
10 | {
11 | internal class OpenSTAGenerator : AbstractGenerator.AbstractGenerator
12 | {
13 | private Repository Rep { get; set; }
14 |
15 | private MainScriptSCL MainScript { get; set; }
16 |
17 | public new void Initialize(string outPath, string mainScriptName, string serverName, string webAppName)
18 | {
19 | base.Initialize(outPath, mainScriptName, serverName, webAppName);
20 |
21 | // inicializo el repositorio del opensta
22 | Rep = new Repository(outPath, mainScriptName);
23 | MainScript = Rep.MainScl;
24 | }
25 |
26 | internal override void AddDataPools(List dataPools, string dataPoolFilesPath)
27 | {
28 | foreach (var dataPool in dataPools)
29 | {
30 | #region leo los archivos referenciados
31 |
32 | var data = new List();
33 | using (var reader = new StreamReader(dataPoolFilesPath + dataPool.FileName))
34 | {
35 | string record;
36 | while ((record = reader.ReadLine()) != null)
37 | {
38 | data.Add(record);
39 | }
40 | }
41 |
42 | #endregion
43 |
44 | #region leo nombre de columnas
45 |
46 | IList> columnsNames = new List>();
47 | foreach (var columnName in dataPool.Columns())
48 | {
49 | var columnVariable = new Variable(columnName, "CHARACTER*128", VariablesScopes.Local);
50 | columnsNames.Add(new KeyValuePair(columnName, columnVariable));
51 |
52 | MainScript.AddVariable(columnVariable);
53 | }
54 |
55 | #endregion
56 |
57 | var df = new DataFile(dataPool.Name, columnsNames, data);
58 | MainScript.AddDataFile(df);
59 | }
60 | }
61 |
62 | internal override AbstractStep AddStep(string name, string type, string description, ScriptGenerator generator, int index)
63 | {
64 | var tmp = generator.ServerName.Split(':');
65 |
66 | string servName, servPort;
67 | if (tmp.Length == 1)
68 | {
69 | servName = generator.ServerName;
70 | servPort = Constants.HTTPConstants.DefaultPortStr;
71 | }
72 | else
73 | {
74 | servName = tmp[0];
75 | servPort = tmp[1];
76 | }
77 |
78 | var newStep = new Step
79 | {
80 | Name = name,
81 | Type = (CommandType)Enum.Parse(typeof(CommandType), type),
82 | Desc = description,
83 | ServerName = servName,
84 | ServerPort = servPort,
85 | WebApp = generator.WebAppName,
86 | Index = index,
87 | };
88 |
89 | AddStep(newStep);
90 |
91 | return newStep;
92 | }
93 |
94 | internal override void Save()
95 | {
96 | throw new NotImplementedException();
97 | }
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/PageRequest.cs:
--------------------------------------------------------------------------------
1 | using Abstracta.FiddlerSessionComparer;
2 | using Abstracta.FiddlerSessionComparer.Utils;
3 | using Abstracta.Generators.Framework.AbstractGenerator;
4 | using Fiddler;
5 |
6 | namespace Abstracta.Generators.Framework.OSTAGenerator
7 | {
8 | internal class PageRequest : AbstractPageRequest
9 | {
10 | internal PageRequest(Session request, AbstractStep myStep, Page page)
11 | : base(request, myStep, page)
12 | {
13 | }
14 |
15 | public override string ToString()
16 | {
17 | return string.Empty;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/ParameterExtractor/OSTARegExParameter.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Abstracta.Generators.Framework.AbstractGenerator.ParameterExtractor;
3 |
4 | namespace Abstracta.Generators.Framework.OSTAGenerator.ParameterExtractor
5 | {
6 | internal class OSTARegExParameter : AbstractRegExParameter
7 | {
8 | internal OSTARegExParameter(ExtractFrom extractParameterFrom, List useParameterIn, string varibleName, string regularExpression, string group, string valueToReplace, string description)
9 | : base(extractParameterFrom, useParameterIn, varibleName, regularExpression, group, valueToReplace, description)
10 | {
11 | }
12 |
13 | public override string ToString()
14 | {
15 | return "Extracted Parameter from Redirect Response: " + VariableName + ": " + RegularExpression;
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/Step.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Abstracta.FiddlerSessionComparer;
3 | using Abstracta.Generators.Framework.AbstractGenerator;
4 | using Abstracta.Generators.Framework.AbstractGenerator.ParameterExtractor;
5 | using Abstracta.Generators.Framework.AbstractGenerator.Validations;
6 | using Abstracta.Generators.Framework.OSTAGenerator.ParameterExtractor;
7 | using Fiddler;
8 | using ExtractFrom = Abstracta.Generators.Framework.AbstractGenerator.ParameterExtractor.ExtractFrom;
9 |
10 | namespace Abstracta.Generators.Framework.OSTAGenerator
11 | {
12 | internal class Step : AbstractStep
13 | {
14 | protected override AbstractRegExParameter CreateRegExpExtractorToGetRedirectParameters(ExtractFrom extractParameterFrom, List useParameterIn, string varName, string expression, string group, string valueToReplace, string description)
15 | {
16 | return new OSTARegExParameter(extractParameterFrom, useParameterIn, varName, expression, group, valueToReplace, description);
17 | }
18 |
19 | protected override AbstractPageRequest CreatePageRequest(Session primaryRequest, AbstractStep abstractStep, Page page, bool secondary = true, bool beanShell = true, bool gxApp = false)
20 | {
21 | return new PageRequest(primaryRequest, abstractStep, page);
22 | }
23 |
24 | internal override DefaultValidation CreateDefaultValidation()
25 | {
26 | return new Validations.DefaultValidation();
27 | }
28 |
29 | internal override CheckMainObjectValidation CreateCheckMainObjectValidation(string objectName)
30 | {
31 | return new Validations.CheckMainObjectValidation(objectName);
32 | }
33 |
34 | internal override AppearTextValidation CreateAppearTextValidation(string text, string desc, bool neg, bool stop)
35 | {
36 | return new Validations.AppearTextValidation(text, desc, neg, stop);
37 | }
38 |
39 | internal override ResponseCodeValidation CreateResponseCodeValidation(int responseCode, string desc = "", bool neg = false, bool stop = true)
40 | {
41 | return new Validations.ResponseCodeValidation(responseCode, desc, neg, stop);
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/Validations/AppearTextValidation.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.Validations
2 | {
3 | internal class AppearTextValidation : AbstractGenerator.Validations.AppearTextValidation
4 | {
5 | internal AppearTextValidation(string text, string errDesc, bool negate, bool stop) : base(text, errDesc, negate, stop)
6 | {
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/Validations/CheckMainObjectValidation.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.Validations
2 | {
3 | internal class CheckMainObjectValidation : AbstractGenerator.Validations.CheckMainObjectValidation
4 | {
5 | internal CheckMainObjectValidation(string objetctName) : base(objetctName)
6 | {
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/Validations/DefaultValidation.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.Validations
2 | {
3 | internal class DefaultValidation : AbstractGenerator.Validations.DefaultValidation
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/OSTAGenerator/Validations/ResponseCodeValidation.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.Generators.Framework.OSTAGenerator.Validations
2 | {
3 | internal class ResponseCodeValidation : AbstractGenerator.Validations.ResponseCodeValidation
4 | {
5 | internal ResponseCodeValidation(int responseCodeValidation, string errDesc = "", bool negate = false, bool stop = true)
6 | : base(responseCodeValidation, errDesc, negate, stop)
7 | {
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("GeneratorFramework")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("GeneratorFramework")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("fd4bf644-3896-4613-a571-ee72d566750f")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/TestingGenerator/PageRequest.cs:
--------------------------------------------------------------------------------
1 | using System.Globalization;
2 | using System.Linq;
3 | using Abstracta.FiddlerSessionComparer;
4 | using Abstracta.Generators.Framework.AbstractGenerator;
5 | using Fiddler;
6 |
7 | namespace Abstracta.Generators.Framework.TestingGenerator
8 | {
9 | internal class PageRequest : AbstractPageRequest
10 | {
11 | internal PageRequest(Session request, AbstractStep myStep, Page page)
12 | : base(request, myStep, page)
13 | {
14 | }
15 |
16 | public override string ToString()
17 | {
18 | var result = "\tPrimReq: (" + (InfoPage == null? "?" : InfoPage.Id.ToString(CultureInfo.CurrentCulture)) + ") " + GetRequestString(FiddlerSession) + "\n";
19 |
20 | // ---------------------------------
21 |
22 | result = ParametersToExtract.Aggregate(result,
23 | (current, paramExtractor) =>
24 | current + ("\t\tGetParameter: " + paramExtractor + "\n"));
25 |
26 | if (ParametersToExtract.Count > 0)
27 | {
28 | result += "\n";
29 | }
30 |
31 | // ---------------------------------
32 |
33 | if (InfoPage != null)
34 | {
35 | var tmp = InfoPage.GetParametersToExtract();
36 | if (tmp.Count > 0)
37 | {
38 | result += string.Join("\n", tmp.Select(p => "\t\tGetParameter: " + p.ToString()).ToArray()) + "\n";
39 | }
40 |
41 | // ---------------------------------
42 |
43 | tmp = InfoPage.GetParametersToUse();
44 | if (tmp.Count > 0)
45 | {
46 | result += string.Join("\n", tmp.Select(p => "\t\tUseParameter: " + p.ToString()).ToArray()) + "\n";
47 | }
48 | }
49 |
50 | // ---------------------------------
51 |
52 |
53 | //esto lo comento porque no se para que sirve y tira una excpecion cuando InfoPage es null
54 | //result = FollowRedirects.Aggregate(result,
55 | // (current, request) =>
56 | // current +
57 | // ("\t\tRedir: " + request.RedirectType + ": " +
58 | // "(" + (InfoPage == null ? "?" : InfoPage.Id.ToString(CultureInfo.CurrentCulture)) + ") " +
59 | // GetRequestString(request.FiddlerSession) +
60 | // "\n\t\t\t" +
61 | // string.Join("\n\t\t\t", request.InfoPage.GetParametersToExtract().Select(p => "GetParameter: " + p.ToString()).ToArray()) +
62 | // "\n\t\t\t" +
63 | // string.Join("\n\t\t\t", request.InfoPage.GetParametersToUse().Select(p => "UseParameter: " + p.ToString()).ToArray()) +
64 | // "\n"));
65 |
66 | if (FollowRedirects.Count > 0)
67 | {
68 | result += "\n";
69 | }
70 |
71 | //// ---------------------------------
72 |
73 | //result = SecondaryRequests.Aggregate(result,
74 | // (current, request) =>
75 | // current + ("\t\tSecRec: " + GetRequestString(request) + "\n"));
76 |
77 | //if (SecondaryRequests.Count > 0)
78 | //{
79 | // result += "\n";
80 | //}
81 |
82 | // ---------------------------------
83 |
84 | result = Validations.Aggregate(result,
85 | (current, validation) =>
86 | current + ("\t\tValidation: " + validation + "\n"));
87 |
88 | if (Validations.Count > 0)
89 | {
90 | result += "\n";
91 | }
92 |
93 | // ---------------------------------
94 |
95 | result += "Think time: " + ThinkTime + " millisecs.\n";
96 |
97 | return result;
98 | }
99 |
100 | private static string GetRequestString(Session req)
101 | {
102 | return "\"" + req.oRequest.headers.HTTPMethod + " " + req.fullUrl + " " + req.oRequest.headers.HTTPVersion + "\"";
103 | }
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/TestingGenerator/ParameterExtractor/TestRegExParameter.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Abstracta.Generators.Framework.AbstractGenerator.ParameterExtractor;
3 |
4 | namespace Abstracta.Generators.Framework.TestingGenerator.ParameterExtractor
5 | {
6 | internal class TestRegExParameter : AbstractRegExParameter
7 | {
8 | internal TestRegExParameter(ExtractFrom extractParameterFrom, List useParameterIn, string varibleName, string regularExpression, string group, string valueToReplace, string description)
9 | : base(extractParameterFrom, useParameterIn, varibleName, regularExpression, group, valueToReplace, description)
10 | {
11 | }
12 |
13 | public override string ToString()
14 | {
15 | return "Extracted Parameter from Response: " + VariableName + ": " + RegularExpression + ": " + ExtractParameterFrom + ": " + ValueToReplace;
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/TestingGenerator/Step.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using Abstracta.FiddlerSessionComparer;
4 | using Abstracta.Generators.Framework.AbstractGenerator;
5 | using Abstracta.Generators.Framework.AbstractGenerator.ParameterExtractor;
6 | using Abstracta.Generators.Framework.AbstractGenerator.Validations;
7 | using Abstracta.Generators.Framework.TestingGenerator.ParameterExtractor;
8 | using Fiddler;
9 | using ExtractFrom = Abstracta.Generators.Framework.AbstractGenerator.ParameterExtractor.ExtractFrom;
10 |
11 | namespace Abstracta.Generators.Framework.TestingGenerator
12 | {
13 | internal class Step : AbstractStep
14 | {
15 | protected override AbstractRegExParameter CreateRegExpExtractorToGetRedirectParameters(ExtractFrom extractParameterFrom, List useParameterIn, string varName, string expression, string group, string valueToReplace, string description)
16 | {
17 | return new TestRegExParameter(extractParameterFrom, useParameterIn, varName, expression, group, valueToReplace, description);
18 | }
19 |
20 | protected override AbstractPageRequest CreatePageRequest(Session primaryRequest, AbstractStep abstractStep, Page page, bool secondary = true, bool beanShell = true, bool gxApp = false)
21 | {
22 | return new PageRequest(primaryRequest, abstractStep, page);
23 | }
24 |
25 | internal override DefaultValidation CreateDefaultValidation()
26 | {
27 | return new DefaultValidation();
28 | }
29 |
30 | internal override CheckMainObjectValidation CreateCheckMainObjectValidation(string objectName)
31 | {
32 | return new CheckMainObjectValidation(objectName);
33 | }
34 |
35 | internal override AppearTextValidation CreateAppearTextValidation(string text, string desc, bool neg, bool stop)
36 | {
37 | return new AppearTextValidation(text, desc, neg, stop);
38 | }
39 |
40 | internal override ResponseCodeValidation CreateResponseCodeValidation(int responseCode, string desc = "", bool neg = false, bool stop = true)
41 | {
42 | return new ResponseCodeValidation(responseCode, desc, neg, stop);
43 | }
44 |
45 | public override string ToString()
46 | {
47 | var result = "Name: " + Name + "\n";
48 | result += "Desc: " + Desc + "\n";
49 | result += "Type: " + Type + "\n";
50 |
51 | return Requests.Aggregate(result, (current, pageRequest) => current + (pageRequest + "\n"));
52 | }
53 | }
54 | }
--------------------------------------------------------------------------------
/GeneratorFramework_4.5/TestingGenerator/TestingGenerator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using Abstracta.Generators.Framework.AbstractGenerator;
5 | using GxTest.Utils.EnumTypes;
6 |
7 | namespace Abstracta.Generators.Framework.TestingGenerator
8 | {
9 | internal class TestingGenerator : AbstractGenerator.AbstractGenerator
10 | {
11 | internal override void AddDataPools(List dataPools, string dataPoolFilesPath)
12 | {
13 | }
14 |
15 | internal override AbstractStep AddStep(string name, string type, string description, ScriptGenerator generator, int index)
16 | {
17 | var tmp = generator.ServerName.Split(':');
18 |
19 | string servName, servPort;
20 | if (tmp.Length == 1)
21 | {
22 | servName = generator.ServerName;
23 | servPort = Constants.HTTPConstants.DefaultPortStr;
24 | }
25 | else
26 | {
27 | servName = tmp[0];
28 | servPort = tmp[1];
29 | }
30 |
31 | var newStep = new Step
32 | {
33 | Name = name,
34 | Type = (CommandType)Enum.Parse(typeof(CommandType), type),
35 | Desc = description,
36 | ServerName = servName,
37 | ServerPort = servPort,
38 | WebApp = generator.WebAppName,
39 | Index = index,
40 | };
41 |
42 | AddStep(newStep);
43 |
44 | return newStep;
45 | }
46 |
47 | internal override void Save()
48 | {
49 | using (var fw = new StreamWriter(HomeFolder + "ProcessingResult.txt"))
50 | {
51 | foreach (var step in Steps)
52 | {
53 | fw.WriteLine(step.ToString());
54 | }
55 | }
56 | }
57 | }
58 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ScriptGenerator
2 | ===============
3 |
4 | This project started with the aim of simplify the way we make scripts in JMeter. There are a lot of ways to create a JMeter script, and we find one that we think is awesome :). Also, we realized that we could extend this tool, not only for JMeter, and we are trying to include OpenSTA support.
5 |
6 | Basically we have two main tools in this solution:
7 | * FiddlerSessionComparer
8 | * GeneratorFramework
9 |
10 | 1 - FiddlerSessionComparer
11 | ---------------------------
12 | Fiddler Session Comparer (FSC) creates a tree view structure based on the "Fiddler sessions". As we know, when we request a page, the page invokes some resources (images, css, js) that it needs to show itself. So, we would say that the first HTTP request is the primary request and the other ones corresponding to additional resources like images, js and css are secondary requests. So, in this manner we would create a tree view for HTTP request.
13 |
14 | FCS uses from two or more (nowadays, just two, we are working to add more) Fiddler Sessions files. After comparing two HTTP requests from Fiddler Sessions files, the comparer detect differences between requests. Each difference is a 'Parameter'. This parameters are reused along all the analysis.
15 |
16 | 2 - GeneratorFramework
17 | ---------------------------
18 |
19 | We created a simple windows command line tool (and GUI) which uses [Fiddler](http://www.telerik.com/fiddler) sessions to create JMeter scripts. You can find our program [here](https://github.com/abstracta/ScriptGenerator/tree/master/Binaries%20.NET%204.5). You must record your sessions with Fiddler, pretty straightforward. While you are recording your sessiong mark with a comment every step of your session. For instance, let´s say that you are recording a test case consisting in search something in google. Your first step will be open www.google.com and then, the second one will be type your query in the search box and hit "search in google". To improve the JMeter generation and help the generator to understand your session, select all the request in your Fiddler session corresponding for the first step, and mark them with a comment, for example with the text "step 1". Then, select all the requests corresponding to your second step and mark them as well, and so on if you have more steps.
20 |
21 | Finally execute the program to create the JMeter script in the following way
22 |
23 | Abstracta.ScriptGeneratorCLI_4.5.exe -h myapp.com -p 80 -a home -f C:\scripts\yourFiddlerSession1.saz -f C:\scripts\yourFiddlerSession2.saz -o C:\script\outputFolder\
24 |
25 | The program will create the script and will store it in a file called _AutogeneratedName.jmx located at your output folder (in the example, C:\script\outputFolder\).
26 |
27 | You can type help for more info or use the GUI if you feel more confortable
28 |
29 | -h, --host=VALUE (required) host name where your web app is
30 | hosted. Example: https://myapp.com/home, host =
31 | myapp.com
32 | -p, --port=VALUE port number where your web app is listening.
33 | Example: https://myapp.com/home, port = 443
34 | This must be an integer. By default the value is
35 |
36 | 80.
37 | -a, --app=VALUE relative application name. Example:
38 | https://myapp.com/home, app = home
39 | -o, --output=VALUE (required) output path
40 |
41 | -f, --fiddlerPath=VALUE (required) fiddler session path
42 | --help show this message and exit
43 |
44 | Hope it helps someone
45 |
46 |
47 |
--------------------------------------------------------------------------------
/ScriptGeneratorCLI_4.5/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ScriptGeneratorCLI_4.5/Program.cs:
--------------------------------------------------------------------------------
1 | using ManyConsole;
2 | using NDesk.Options;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace ScriptGeneratorCLI_4._5
10 | {
11 | class Program
12 | {
13 | static int Main(string[] args)
14 | {
15 | // locate any commands in the assembly (or use an IoC container, or whatever source)
16 | var commands = GetCommands();
17 |
18 | // then run them.
19 | return ConsoleCommandDispatcher.DispatchCommand(commands, args, Console.Out);
20 | }
21 |
22 | public static IEnumerable GetCommands()
23 | {
24 | return ConsoleCommandDispatcher.FindCommandsInSameAssemblyAs(typeof(Program));
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/ScriptGeneratorCLI_4.5/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("ScriptGeneratorCLI_4.5")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("ScriptGeneratorCLI_4.5")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("f34d337b-a116-4230-96bc-0fcedeb55a4e")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/ScriptGeneratorCLI_4.5/ScriptGeneratorCLI_4.5.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {7FE929C8-93A9-4B99-841E-92E407AED7F8}
8 | Exe
9 | Properties
10 | Abstracta.ScriptGeneratorCLI_4._5
11 | Abstracta.ScriptGeneratorCLI_4.5
12 | v4.5
13 | 512
14 |
15 |
16 | AnyCPU
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | AnyCPU
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 |
36 | ..\dependencies\.NET_4.5\FiddlerCore.dll
37 |
38 |
39 | ..\packages\ManyConsole.0.4.2.17\lib\ManyConsole.dll
40 |
41 |
42 | ..\packages\NDesk.Options.0.2.1\lib\NDesk.Options.dll
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 | {9a06dd95-6713-463d-bdc3-b841a2f2e9ac}
67 | GeneratorFramework_4.5
68 |
69 |
70 |
71 |
78 |
--------------------------------------------------------------------------------
/ScriptGeneratorCLI_4.5/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/ScriptGeneratorGUI_3.5/App.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ScriptGeneratorGUI_3.5/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Windows;
7 |
8 | namespace ScriptGenerator
9 | {
10 | ///
11 | /// Interaction logic for App.xaml
12 | ///
13 | public partial class App : Application
14 | {
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ScriptGeneratorGUI_3.5/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/ScriptGeneratorGUI_3.5/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | [assembly: AssemblyTitle("ScriptGenerator")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("ScriptGenerator")]
15 | [assembly: AssemblyCopyright("Copyright © 2014")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | //In order to begin building localizable applications, set
25 | //CultureYouAreCodingWith in your .csproj file
26 | //inside a . For example, if you are using US english
27 | //in your source files, set the to en-US. Then uncomment
28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
29 | //the line below to match the UICulture setting in the project file.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36 | //(used if a resource is not found in the page,
37 | // or application resource dictionaries)
38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39 | //(used if a resource is not found in the page,
40 | // app, or any theme specific resource dictionaries)
41 | )]
42 |
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/ScriptGeneratorGUI_3.5/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.18444
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Abstracta.ScriptGenerator.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Abstracta.ScriptGenerator.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/ScriptGeneratorGUI_3.5/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.18444
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Abstracta.ScriptGenerator.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/ScriptGeneratorGUI_3.5/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ScriptGeneratorGUI_4.5/App.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ScriptGeneratorGUI_4.5/App.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace Abstracta.ScriptGenerator
2 | {
3 | ///
4 | /// Interaction logic for App.xaml
5 | ///
6 | public partial class App
7 | {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/ScriptGeneratorGUI_4.5/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/ScriptGeneratorGUI_4.5/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Windows;
4 | using System.Xml;
5 | using Abstracta.Generators.Framework;
6 | using Fiddler;
7 |
8 | namespace Abstracta.ScriptGenerator
9 | {
10 | ///
11 | /// Interaction logic for MainWindow.xaml
12 | ///
13 | public partial class MainWindow
14 | {
15 | public MainWindow()
16 | {
17 | InitializeComponent();
18 |
19 | }
20 |
21 | private void GenerateScript(object sender, RoutedEventArgs e)
22 | {
23 | GenerateScript();
24 | }
25 |
26 | private void GenerateScript()
27 | {
28 | string host = Host.Text;
29 | string appName = AppName.Text;
30 |
31 | try
32 | {
33 | string path = ResultFolderName.Text;
34 | if (!Directory.Exists(path))
35 | {
36 | throw new Exception("Folder doesn't exists: " + path);
37 | }
38 |
39 | if (!path.EndsWith("\\") || !path.EndsWith("/"))
40 | {
41 | path += "\\";
42 | }
43 |
44 | string f1 = FiddlerFileName1.Text;
45 | string f2 = FiddlerFileName2.Text;
46 |
47 | // create array of sessions
48 | Session[][] sessions = (string.IsNullOrEmpty(f2)) ? new Session[1][] : new Session[2][];
49 |
50 | if (!File.Exists(f1))
51 | {
52 | MessageBox.Show("File doesn't exists: " + f1, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
53 | return;
54 | }
55 |
56 | // load sessions of file1
57 | sessions[0] = Generators.Framework.ScriptGenerator.GetSessionsFromFile(f1);
58 | if (sessions[0] == null)
59 | {
60 | MessageBox.Show("File not found or unknown format for Sessions1: " + f1, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
61 | return;
62 | }
63 |
64 | // load sessions of file2
65 | if (!string.IsNullOrEmpty(f2))
66 | {
67 | if (!File.Exists(f2))
68 | {
69 | MessageBox.Show("File doesn't exists: " + f2, "Error", MessageBoxButton.OK,
70 | MessageBoxImage.Error);
71 | return;
72 | }
73 |
74 | sessions[1] = Generators.Framework.ScriptGenerator.GetSessionsFromFile(f2);
75 | if (sessions[1] == null)
76 | {
77 | MessageBox.Show("File not found or unknown format for Sessions2: " + f2, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
78 | return;
79 | }
80 | }
81 |
82 | XmlDocument gxTest = null;
83 | var gxTestFile = GxTestFile.Text;
84 | if (File.Exists(gxTestFile))
85 | {
86 | gxTest = new XmlDocument();
87 | gxTest.Load(gxTestFile);
88 | }
89 |
90 | var replaceInBodies = ReplaceInBodies.IsChecked != null && ReplaceInBodies.IsChecked.Value;
91 | var isGenexusApp = IsGenexusApp.IsChecked != null && IsGenexusApp.IsChecked.Value;
92 |
93 | var generator = new Generators.Framework.ScriptGenerator(path, path, gxTest, sessions, host, appName, isGenexusApp, replaceInBodies);
94 | generator.GenerateScripts(GeneratorType.JMeter);
95 | generator.GenerateScripts(GeneratorType.Testing);
96 | }
97 | catch (Exception ex)
98 | {
99 | MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
100 | }
101 |
102 | MessageBox.Show("Finished", "Notification", MessageBoxButton.OK, MessageBoxImage.Information);
103 | }
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/ScriptGeneratorGUI_4.5/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | [assembly: AssemblyTitle("ScriptGenerator_4.5")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("ScriptGenerator_4.5")]
15 | [assembly: AssemblyCopyright("Copyright © 2014")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | //In order to begin building localizable applications, set
25 | //CultureYouAreCodingWith in your .csproj file
26 | //inside a . For example, if you are using US english
27 | //in your source files, set the to en-US. Then uncomment
28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
29 | //the line below to match the UICulture setting in the project file.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36 | //(used if a resource is not found in the page,
37 | // or application resource dictionaries)
38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39 | //(used if a resource is not found in the page,
40 | // app, or any theme specific resource dictionaries)
41 | )]
42 |
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/ScriptGeneratorGUI_4.5/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.18444
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Abstracta.ScriptGenerator.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Abstracta.ScriptGenerator.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/ScriptGeneratorGUI_4.5/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.18444
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Abstracta.ScriptGenerator.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/ScriptGeneratorGUI_4.5/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ScriptGeneratorGUI_4.5/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/clear.bat:
--------------------------------------------------------------------------------
1 | rmdir /S /Q Common\bin
2 | rmdir /S /Q Common\obj
3 |
4 | rmdir /S /Q "FiddlerSessionComparerTests_4.5\bin"
5 | rmdir /S /Q "FiddlerSessionComparerTests_4.5\obj"
6 |
7 | rmdir /S /Q "FiddlerSessionComparer_3.5\bin"
8 | rmdir /S /Q "FiddlerSessionComparer_3.5\obj"
9 | rmdir /S /Q "FiddlerSessionComparer_4.5\bin"
10 | rmdir /S /Q "FiddlerSessionComparer_4.5\obj"
11 |
12 | rmdir /S /Q "FiddlerSessionComparerCLI_3.5\bin"
13 | rmdir /S /Q "FiddlerSessionComparerCLI_3.5\obj"
14 | rmdir /S /Q "FiddlerSessionComparerCLI_4.5\bin"
15 | rmdir /S /Q "FiddlerSessionComparerCLI_4.5\obj"
16 | rmdir /S /Q "FiddlerSessionComparerGUI_4.5\bin"
17 | rmdir /S /Q "FiddlerSessionComparerGUI_4.5\obj"
18 |
19 | rmdir /S /Q GeneratorFramework_3.5\bin
20 | rmdir /S /Q GeneratorFramework_3.5\obj
21 | rmdir /S /Q GeneratorFramework_4.5\bin
22 | rmdir /S /Q GeneratorFramework_4.5\obj
23 |
24 | rmdir /S /Q ScriptGeneratorCLI_3.5\bin
25 | rmdir /S /Q ScriptGeneratorCLI_3.5\obj
26 | rmdir /S /Q ScriptGeneratorCLI_4.5\bin
27 | rmdir /S /Q ScriptGeneratorCLI_4.5\obj
28 |
29 | rmdir /S /Q ScriptGeneratorGUI_3.5\bin
30 | rmdir /S /Q ScriptGeneratorGUI_3.5\obj
31 | rmdir /S /Q ScriptGeneratorGUI_4.5\bin
32 | rmdir /S /Q ScriptGeneratorGUI_4.5\obj
33 |
34 | rmdir /S /Q ScriptGeneratorCLI_4.5\bin
35 | rmdir /S /Q ScriptGeneratorCLI_4.5\obj
36 |
37 | pause
--------------------------------------------------------------------------------
/copyLastVersion.bat:
--------------------------------------------------------------------------------
1 | move /Y "ScriptGeneratorGUI_3.5\bin\Debug\Abstracta.ScriptGeneratorGUI_3.5.exe" "Binaries .NET 3.5"
2 | move /Y "ScriptGeneratorGUI_3.5\bin\Debug\*.dll" "Binaries .NET 3.5"
3 |
4 | move /Y "ScriptGeneratorCLI_4.5\bin\Debug\Abstracta.ScriptGeneratorCLI_4.5.exe" "Binaries .NET 4.5"
5 | move /Y "ScriptGeneratorCLI_4.5\bin\Debug\*.dll" "Binaries .NET 4.5"
6 | move /Y "ScriptGeneratorGUI_4.5\bin\Debug\Abstracta.ScriptGeneratorGUI_4.5.exe" "Binaries .NET 4.5"
7 | move /Y "ScriptGeneratorGUI_4.5\bin\Debug\*.dll" "Binaries .NET 4.5"
8 |
9 | pause
--------------------------------------------------------------------------------
/dependencies/.NET_3.5/FiddlerCore.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/dependencies/.NET_3.5/FiddlerCore.dll
--------------------------------------------------------------------------------
/dependencies/.NET_3.5/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/dependencies/.NET_3.5/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/dependencies/.NET_4.5/FiddlerCore.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/dependencies/.NET_4.5/FiddlerCore.dll
--------------------------------------------------------------------------------
/dependencies/.NET_4.5/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/dependencies/.NET_4.5/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/dependencies/Abstracta.GXtest.Utils.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/dependencies/Abstracta.GXtest.Utils.dll
--------------------------------------------------------------------------------
/dependencies/ICSharpCode.SharpZipLib.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/dependencies/ICSharpCode.SharpZipLib.dll
--------------------------------------------------------------------------------
/dependencies/Ionic.Zip.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/dependencies/Ionic.Zip.dll
--------------------------------------------------------------------------------
/dependencies/Simplicit.Net.Lzo.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abstracta/ScriptGenerator/43d51c600f7a8cb7a93aea61adc5a840fd06cbd2/dependencies/Simplicit.Net.Lzo.dll
--------------------------------------------------------------------------------