Debug in the Orchestration and in the map - debugging

i have a map that does not work properly.
I have mapped a field from a my brand new schema into a canonical schema, but the problem is that in the canonical there is a field that is not valorized (but it results correclty mapped).
I want to know how it is possible.
How debugging a orchestration/map?
PS: the orchestration takes values from a MSSQL SP and then with the map construct a xml wellformatted.
PS2: Data in SQL are correctly valorized (query returns my the aspected value).
Tnx

How to use the debugger on a BizTalk map (if you're using visual studio 2010):
left click on the btm file you want to debug in the solution explorer window
set the "testmap input instance" to your input file. Write the input as an xml file.
set the "testmap output instance" to some file name where it can store the output.
right click on the btm file in the solution explorer then choose 'debug map'
It will open a window containing your map converted to xsl and set a breakpoint in the xsl.
You can set breakpoints and view values in the xsl just as if you were debugging regular C# code.
It will open a second window that will contain the output file as it constructs it.

Related

What is that syntax : $FilePath$ -t?

What is that syntax and how can I find the corresponding value in
$FilePath$ -t
This is added as parameters in the PhpStorm IDE CSS comb installation.
That $FilePath$ is macros in File Watcher/External Tools. It gets resolved to the actual value when file watcher gets executed.
You can check all of them and insert new ones by clicking on "Insert Macro..." button next to the input field (preview value for your current project/file is shown for most of them, excluding complex macro that can have additional parameters).
https://www.jetbrains.com/help/phpstorm/2019.1/new-watcher-dialog.html
Arguments are usually specified using macros, for example, $FileName$ or $FileNameWithoutExtension$, that will be replaced with actual file names.
Type the macros manually or click Insert Macro and select the relevant pattern from the list in the Macros dialog that opens.
P.S. For the File Watcher, if you set "Show console" to be "Always", you will then be able to see the whole command that gets executed (when it gets executed, not before that).

Calling report with oracle report builder 12

I need to call an other report with parameters from my report by report builder 12. But it seems to be, there is no button for calling an other one. Is there any way to call second report from the first one?
Such a functionality is called drill down (so that you'd be able to research it yourself, if you want).
In the old Reports 6i, you could have done it by creating a button. In modern Reports version, you'll have to use a hyperlink - it can be found within the "Web" settings, and looks like this:
http://your_server:port/reports/rwservlet?userid=scott/tiger#orcl+report=your_report.rdf+
destype=cache+desformat=html+par_deptno=&deptno
Interesting part is the very end of it, which shows how to pass a parameter from this report (which contains the &deptno value) to another report (which expects deptno value to be passes into the par_deptno parameter).
First stop the report server. (OC4J instance also for 10g)
Search for CGICMD.DAT file in Developersuite home. (for 10g It’s located at folder. And for 11g D:\Oracle\Middleware\user_projects\domains\ClassicDomain\config\fmwconfig\servers\WLS_REPORTS\applications\reports_11.1.2\configuration)
Open the CGICMD.DAT file and go to bottom line and add the bellow lines and modify as your value.
; hrs: userid=test/password#orcl server=rep_server desformat=pdf destype=cache paramform=no %*
(Where first userid, report server name, report destination format, destination type and no parameter form.)
Save and close the file.
Now open the report which will have the link.
Select the data field and press F11 to go code editor and add the bellow code before
return (true);
SRW.SET_HYPERLINK('http://SERVER_NAME:8889/reports/rwservlet?hrs+report='D:\ID_CARD_ALL.rep+EMPID='||:EMP_ID);
(Change the report server url as you have, report name and parameter if you have)
Compile and save the reports.
Now Run the report server and run your report…
LOVE U SETAREH

Save results of a call into a Context Parameter using VS Load Testing

I have a recorded Visual Studio Load Test (using Visual Studio 2015).
It seems to have recorded fine, but if I just play it back as it is, I am going to get primary key violations.
I have logic like this in my application:
Ask the web service for an ID.
Take that ID and pass it into a save call.
I know that I can put in the value of a "Context Parameter" using {{ variable }} syntax.
But I have not been able to find a way save a value off at run time into a Context Parameter.
Is there a way to take part of a result and then use it for future calls?
The simple way is to add an extraction rule to the request. There are several types of extraction rule for getting different types of data from the response. They are added via the context (right click) menu of the requests. Select the required extraction rule and set the properties as needed.
More complicated extractions can be done by writing your own extraction rule or by writing a Plugin.
If the text to be extracted can be selected in the "Response" tab of the web test execution results then, sometimes, the context menu of that selected text has a "Add extraction rule" entry (I may have mis-remembered the exact wording). If using this then check the rule that is added. It often creates a rule looking for a very short Starts with string and looking for the Nth occurrence. Eg, in HTML the text Value=" is common and the generated rule might be to find the 17th occurence of alue=. The rule may be a good starting point but works better to select the first (ie index 0) occurrence of a longer string.
(Little or nothing has changed between the 2010 and the 2015 versions of Visual Studio as far as the referenced articles are concerned.)

Replacing recorded values with Data file - Data driven testing

I have recorded a simple Coded UI test from visual Studio 2013. What it does is;
Launches a website
Fills in a form with (8 fields)
Saves the form and closes it
Now, I wish to use a data.csv file to replace those 8 values. All the searching I did, I could only find options where every input field had different method hence was easy to find and replace values. In my case, 1 method and 8 fields.
How do I do that? Where do I make the changes since my main file looks like this:
Where and what changes should I make to use CSV file instead of manual values that I recorded.
My designer file code is as below for couple of input fields:
// Type '123456789' in 'i' text box
uIIEdit.Text = this.createKundeParams.UIIEditText;
// Type '{Tab}' in 'i' text box
Keyboard.SendKeys(uIIEdit, this.createKundeParams.UIIEditSendKeys, ModifierKeys.None);
// Type 'Jeff Hardy' in 'name_i' text box
uIName_iEdit.Text = this.createKundeParams.UIName_iEditText;
// Type '{Tab}' in 'name_i' text box
Keyboard.SendKeys(uIName_iEdit, this.createKundeParams.UIName_iEditSendKeys, ModifierKeys.None);
you can put all the 8 values in 1 csv row and treat them as one input to be passed to the method that sets the fields, alternatively you can change the method to accept one value and field name and sets the field with the value
Create the CSV file.
Add the CSV file to the project.
Make sure the CSV file is deployed.
Add the CSV file as a data source for an individual test.
Read the CSV fields and use them in the test.
The detailed steps, with some variations, are explained below.
Visual Studio 2010 has a "data source wizard" that does some of these steps. Visual Studio versions 2012 and 2013 do not have the wizard and so all the steps have to be done manually.
Create the CSV file
One way is to create the file in a spreadsheet then save it as Comma Separated Values. Another way is to use a text editor and just write the file. I use a spreadsheet program for big data source files and a text editor for creating small files. Some editors add a byte order mark (BOM) at the start of a file, that will be added to the first field name of the CSV which appears to make the field unreadable. See this page for more about the BOM.
Add the CSV file to the project
Use the context menu in solution explorer, select Add -> Existing Item. Then browse to the required file. Note the file filter will probably need to be altered to be . or *.csv.
Make sure the CSV file is deployed
Open the properties panel for the CSV file from solution explorer. Set "Copy to output directory" to "Copy if newer" or to "Copy always". Some documents recommend "Copy if newer" but I prefer "Copy always" as occasionally a file was not copied as I expected. The difference between the two copy methods is a little disk space and a little time, but disks are normally big and the time to copy is normally small. Any savings are, in my opinion, far outweighed by being sure that the file will be copied correctly.
Add the CSV file as a data source for an individual test
Replace the [TestMethod] attribute with the correct data source line. This Microsoft blog shows the replacement code for several possible data source file types. For CSV use:
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV",
"|DataDirectory|\\data.csv", "data#csv",
DataAccessMethod.Sequential), DeploymentItem("data.csv"),
TestMethod]
Note that the file name occurs three times and one copy has a # rather than a .. I have not found any useful documentation about the different fields of the Datasource(...) attribute so cannot advise further on how to choose values for non-CSV data sources.
The |DataDirectory| part above is replaced by the directory where files are deployed when the tests run. The whole file name within the string quotes could be replaced by a full path name of a file, if required.
Read the CSV fields and use them in the test
The Coded UI record and generate tool creates classes with fields that hold values entered into text boxes or used in assertions. Each action method has a ...Params class and each assert method has an ...ExpectedValues class, where the ... is the method name. The default values of these fields are the values used when the test was recorded. The recorded values can be overwritten by an assignment before the action or assertion method is called. The fields of the current row of the data source are accessed from TestContext.DataRow[...].
Suppose a Coded UI test has an EnterValue method that writes text into two fields of the screen and it also has a CheckResult method that asserts one field. The test method might then be written as follows.
[DataSource...
TestMethod]
public void CodedUITestMethod1()
{
this.UIMap.EnterValueParams.UIItem0TextSendKeys = TestContext.DataRow["ValueOne"].ToString();
this.UIMap.EnterValueParams.UIItem1TextSendKeys = TestContext.DataRow["ValueTwo"].ToString();
this.UIMap.EnterValue();
this.UIMap.CheckResultExpectedValues.UIItem0TextDisplayText = TestContext.DataRow["Result"].ToString();
this.UIMap.CheckResult();
}
The ...Params and ...ExpectedValues classes allow the test to create values when the test runs. For example, if the EnterValue method also wanted to write tomorrow's date into a field we could add the following line before it is called:

Xcode 4: How can I reference project variables/macros in a file template?

Ok, so, I've got a relatively complex project template hierarchy that defines code style related macros and variables (curlies on same or new line, indentation, etc). My code style template will probably give more context
Works great when generating a project.
However, I'm not seeing a clear path to reusing these macros/variables when generating new files after the project has been built. Findings so far:
macros and variables defined at the project level are not substituted when referenced in a file template
popup option definitions in file templates do not seem to support complex definitions (e.g. defining a macro when the drop down is in a given state)
project variables do appear to become defaults for options of the same name in the file template wizard
file templates don't appear to be able to define other templates as ancestors
Any ideas?
Enter the following line:
defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{ "ORGANIZATIONNAME" = "Your Company Name" ; }'
into a Terminal window, replacing "Your Company Name" with whatever you choose.
You can also open the file at ~/Library/Preferences/com.apple.Xcode in "Property List Editor" and insert your company name as a string value for the key "ORGANIZATIONNAME" under the dictionary "PBXCustomTemplateMacroDefinitions". You may need to create "PBXCustomTemplateMacroDefinitions" at the top level if it doesn't already exist.

Resources