Intellij Error: Environment variable name is not set - intellij-idea

At the bottom of run configuration there is the error message :
Error: Environment variable name is not set
When I click on the "Fix" button, an empty line is created in the "environment variables" section in the startup/connection tab.
What variable is missing ?

Click the "-" button at the bottom, it looks like there is some empty environment variable set or your existing variables were not parsed correctly which has added a blank variable.
If you have the steps to reproduce it with the broken environment variable that cannot be parsed, please report a bug.

Related

RobotFramework : scope of variables

I have a problem with the ${testAccount} variable.
When I modify this variable in the user keyword "Modify user name", the Log informs me that the modification is correct.
When I use this variable in the keyword "Change activation", it is equal to the initial value and not the modified one.
Here is the script I wrote :
*** Keywords ***
Modify user name
Set Global Variable ${testAccount}
Wait Until Element Is Visible xpath=//a[#ng-click="openCreateEditModal(tenant)"]
Click Element //td[text()='${testAccount}']/following-sibling::td//a[#ng-click="openCreateEditModal(tenant)"]
Wait Until Page Contains Edit an account
Click Element xpath=//input[#ng-model="tenant.name"]
Press Key xpath=//input[#ng-model="tenant.name"] \\08
${testAccount}= Get Substring ${testAccount} \ -1
Click Button xpath=//button[#ng-click="valid()"]
Wait Until Page Contains ${testAccount}
Change activation
Wait Until Element Is Visible xpath=//a[#ng-click="openCreateEditModal(tenant)"]
Click Element //td[text()='${testAccount}']/following-sibling::td//a[#ng-click="openCreateEditModal(tenant)"]
I tried to use the keywords 'Set Global Variable' or 'Set Suite Variable', but it doesn't work any better. Maybe I don't use them properly.
Could you, please, help me understand ?
Simply add the 'Set Global Variable' keyword after the line that modifies the contents of the variable ${testAccount}. Thus the new content of this variable will be taken into account in the following testcase until it changes again.
You can use Set Suite Variable Keyword.
Follow the below link
http://robotframework.org/robotframework/latest/libraries/BuiltIn.html#Set%20Suite%20Variable
Also use Return Statement at the end of first Keyword 'Modify user name' and use the variable '${testAccount}' as an argument in the second keyword 'Change activation'
Check the code below.
Modify user name
Set Suite Variable ${testAccount}
Wait Until Element Is Visible xpath=//a[#ng-
click="openCreateEditModal(tenant)"]
Click Element //td[text()='${testAccount}']/following-sibling::td//a[#ng-
click="openCreateEditModal(tenant)"]
Wait Until Page Contains Edit an account
Click Element xpath=//input[#ng-model="tenant.name"]
Press Key xpath=//input[#ng-model="tenant.name"] \\08
${testAccount}= Get Substring ${testAccount} \ -1
Click Button xpath=//button[#ng-click="valid()"]
Wait Until Page Contains ${testAccount}
Return ${testAccount}
Change activation ${testAccount}
Wait Until Element Is Visible xpath=//a[#ng-click="openCreateEditModal(tenant)"]
Click Element //td[text()='${testAccount}']/following-sibling::td//a[#ng-
click="openCreateEditModal(tenant)"]

Returning to usage's location after Intellij IDEA "Create on Usage" intention action

Suppose I type a Java method call with an argument that I intend to make into a field:
knownObject.knownMethod(newField);
At this point, newField is highlighted as compilation error. I can press Alt+Enter and select "Create Filed 'newField'" from the menu.
That brings me up to the beginning of the class file where other fields are defined.
I can press Enter to confirm the new field's type.
Now I'd like to go back to my knownMethod() call and continue coding. How do I do that?
Bonus question: in the above situation, Ctrl+Shift+Backspace may help because I just edited the the knownMethod() call. What if I decide to first type in multiple arguments to the method? How do I get back to the argument I've just created a field for in that case?
For getting back to a previous caret location the Navigate > Back menu item usually works (CtrlAltLeft Arrow on Windows). Another option may be to use Edit > Find > Find Usages on the field (enable the Skip results tab with one usage checkbox setting)

Update and use a Variable in an expression in SSIS

I am trying to use a variable that I am updating in a loop inside an expression in SSIS. I am going to trying to be as clear as possible. Before to arrive to the last Data Flow Task (where I have a ODBC source), I am getting some values inside the variable (Return) that I am going to use in the [ODBC Source].[SqlCommand], with the second Script Task I could checked that the variable is been updating in the way I need. The problem is that in the Data Flow the expression is taking into account this variable but with the Default value that I have choosen ('').
In the first Script task I am updating the variable:
Dts.Variables["Return"].Value = Dts.Variables["Return"].Value + identif;
So, I do not know if I missed a previous indication or what could be happening with the execution of this control flow
The Variables window will not show you the value of the variable at the end of package execution. You need to set breakpoints and use the local window to "catch" the value of the variable before and after it changes.
Breakpoints Example
I have a package with a single script task.
The code inside is this...
new string strReturn = "NewValue";
public void Main()
{
// TODO: Add your code here
Dts.Variables["Return"].Value = strReturn;
Dts.TaskResult = (int)ScriptResults.Success;
}
The code sets the my SSIS variable equal to NewValue. To catch this variable changing values I will set breakpoints. To set breakpoints, right-click the Script Task and select Edit Breakpoints.
Set a Pre and PostExecute breakpoint. Save and then execute the package. When it reaches the breakpoint, it will pause. The first pause is PreExecute event, just before the script is about to execute. During this pause, you can enter the name of your variable into the locals window.
You will see that the value has not changed yet. Press the continue button to move to the next breakpoint, PostExecute. Now, the Script Task has been executed. Check the local window and you should see that the value has changed!
Notice that throughout each of these the top left Variables window never shows an updated value. It always shows '' . You must use breakpoints to see a variable value changing. Hope this helps you to debug your package!

Xcode debugger doesn't print object also not showing any error message

I am using Xcode 5.1.1, my debugger accept object when i try to print them but doesn't print details of it. Also it is not showing any error message.
I have checked all answer listed for one similar question here but didn't found any of such error in my xcode setting.
Can some one please tell me where else i need to check?
After checking all the buttons in debugger window, found there is button at bottom (default selected "All Output") which popup drop-down when we click on it.
This was set to 'Target Output' which causing the problem. Select option either 'All Output' or 'Debugger Output', then we can get values of variable/object when we say po variable/object.
For me the issue was the filter. If you try to use po variable when the filter is on, the response may be filtered out and not show.

How do I set up a dynamic file path in SSIS for an Excel file?

The name of the file changes based on months. Every month you have a new file.
I:\Test\Data_201303.xlsx
How do I set up a connection manager that will work with variable file paths?
Look for the "expression" property on the connection manager. That's where you set it to USER::VariableName.
More detail: if you "edit" the connection manager it will show you the edit window. That's not the one you want. Look at the "properties" window, which is where you will find the "Expressions" entry, in front of an empty box.
Click on the empty box, and it will show you a button with three dots on it. Click on that button. This pulls up the "Property Expression Editor". There is a dropdown with properties like "ConnectionString" on the left. On the right, there is ANOTHER button with three dots. Click on that button to pull up the "Expression Builder". If you have declared any variables, you will find them listed in the upper left hand corner, e.g., as User::VariableName, and you can then drag them into the Expression box, where they will appear as #[User::VariableName].
Not obvious, but doable.
You need to set the expression for the ServerName or ExcelFilePath property to modify ConnectionString of Excel connection manager dynamically using an SSIS package variable.
Here are some SO answers that deal with looping multiple Excel files :
How to loop through Excel files and load them into a database using SSIS package?
How to import Excel files with different names and same schema into database?