How to configure Cucumber feature file in Eclipse? - eclipse

I have a feature file as below:
Feature: Log in to the application
#OnlyOneTime
Scenario: Login to application as valid user
When User enter the valid credentials
And Click on Login
Then Home Page should be displayed
Scenario: Login to application as Invalid user
When User enter the inValid credentials
And Click on Login
Then Error Message Should be displayed
But the problem is it is being shown as plain file not at all with the gherkin colors, also I can't see find step option when I right click on a step.

I was also looking for a solution to this. Can't find anything on the web. So I keep looking on eclipse editor and found this.
Window -> Preferences
On the left side Preferences window click General -> Editors -> File Associations
on the right side click Add... Enter *.feature on the textbox then click OK
Select the newly added *.feature on the list
Under Associated editors click Add... then choose the Editor with the green cucumber icon. click okay
Apply and Close

Please follow the following steps
-Right click on . feature file -> Open With -> Cucumber Editor

I found an answer :
When everything is installed right, and if feature file does not display the gherkin colors, We need to first create a sample cucumber.feature file in the same path.
Once this is created if it is auto-populated with sample gherkin code, then other feature file will also work or we can simply paste content of our feature file into cucumber.feature and then rename it.

Related

QA plugin for intellij

I am trying to load my customized checkstyle configuration xml in the QA Plug in for IntelliJ.
The following is the graphic interface that I get in order to configure it:
In the label "Jar file", what am I supposed to upload? What kind of jar are they talking about? I have only the checkstyle xml configuration file.
If you just want to use Checkstyle I would recommend to use CheckStyle-IDEA instead. Its included version of Checkstyle is much more up to date then the one provided by QAPlug.
Regarding your question, I think the dialog you presented is to add additional Checkstlye checks, e.g. sevntu-checkstyle. If you would like to have such additional checks then you would need to add a configuration and a jar file with the checks.
To import your checkstyle.xml try as described in import and export analysis profiles on the QAPlug homepage. There it says "You are able to import several coding rules configuration files (eg. Checkstyle, PMD, FindBugs) to one profile simply be repeating import action."
First, save your desired configuration xml file somewhere locally on your computer.
Right-Click/Ctrl-click on the file or directory you want analyzed with QAplug and click "Analyze Code". This should bring up an interface saying "Specify Analysis Scope"
Under the "Analysis Profile" heading, tick the Run with Chose Profile button. Then click on the ... box to search for the proper directory.
This brings up another window titled Coding Rules. Click the + button that pops up and select either project profile or ide profile according to taste.
This brings up yet another window titled New Profile. Name your profile appropriately. Tick the import profile button and then it will allow you to import profile from and point it at the .xml file you saved in #1. Hit Ok.
Now under the analysis profile, you should be able to choose the newly created profile. Click OK and you're good to go.

TestNg Report Screen Shot

I am using TestNg for reporting purpose and attaching the screen shot as hyper link to the test cases using Reporter.log but as these screen shot file path is my local system folder. how can some one else access the screen shot through the report, When am emailing the report.
Actually in this case the screenshot files sharing is not up to your TestNG implementation. If you were using some CI server like Jenkins, Bamboo or similar it would be easier. If the
path is my local system folder
and you are on Windows, you can give other specified users access to your folder system. First make sure the Sharing Wizard is enabled, click the Start button Picture of the Start button, type “folder” in the Search box, and then click Folder Options. Click the View tab. In the Advanced settings box, scroll down the list and make sure the Use Sharing Wizard (Recommended) check box is selected. Then:
In Windows Explorer, select the folders or files you want to share. (You can select multiple objects.)
In the Command bar, click Share. (Alternatively, right-click, and then click Share.)
In the file sharing box, enter the name of the user with whom you want to share files or folders, and then click Add. You can type a name in the box or click the arrow to display a list of available names. Repeat for each person you want to add.
For each user, select a permission level.
Click Share
In the final step of the wizard, you can choose tasks to be performed (send email etc.)
Click Done

Clear history for Open Resource dialog in Eclipse

How can I clear the history of the Open Resource dialog? The history shows all the files you've opened before using the Open Resource dialog, and is shown before you start typing a query in the search field:
I can't find any way to reset/clear it, and lately it has become cluttered, it contains almost every file in the project.
Just select an entry and hit Delete.
Or right click on an entry and choose Remove from History.
You can select all of them with Ctrl+A and remove them with one command.
This works in the JDT Open Type dialog too.

Is there a way to have Visual Web Developer ignore build errors?

I'm using MS's VWD to edit some .aspx files in our website (I'm opening it as a website, not a project/solution).
I have some temporary files just for testing and some generate Build errors in VWD 2010.
But VWD won't let me "run" other pages in the website with those Build Errors present.
Is there a way to get it to IGNORE them?
Im using Visual web developer express,
but assume the the settings are the same.
click on TOOLS on the MENUBAR
click on OPTIONS when the TOOLS menu drops down
click on SHOW ALL SETTINGS when the OPTIONS window appears
click on PROJECTS AND SOLUTIONS in the LEFT hand panel
click on BUILD AND RUN in the projects and solutions drop down
in the rigt hand panel, look for the text "On Run, when build or deployment errors occur:"
change it to "PROMPT TO LAUNCH"
click OKAY button to save changes
Voila.

Netbeans Shortcut to Open File

I remember seeing someone use a shortcut in NetBeans to open a dialog similar to phpStrom that can open files based on class names or is it file name. whats that?
Updated
I'm fairly certain you are referring to the "Quick File Chooser" plugin. As someone else points out, though, there are several other candidates. I list them below...
The Quick File Chooser Plugin:
By default CTRL-SHIFT-O opens the Open Project dialog, and once the plugin is installed, you will get the dialog pictured here automatically:
(The Quick File Chooser plugin replaces the default open project dialog with its own.)
When opening a file with the Quick File Chooser plugin, you see this:
I did not find that the plugin was able to open based on a class name.
Quick File Chooser is available through the NetBeans Plugin Portal. You can also install it directly from within NetBeans versions 7.1 and 7.3 if you have the "Plugin Portal" Update Center configured. (See the bottom of this answer for instructions.)
NetBeans Core (no plugin)
By default CTRL-SHIFT-O opens the Open Project dialog, and without the QFC plugin, you will get the default dialog:
The default Open File dialog is this:
The Open File dialog does not have a keyboard shortcut by default, but you can easily add it:
Click on Tools, then Options, then on the Keymap icon in the tool bar of the dialog.
In Search: type "Open Fi" and you should see "Open File..." in the Actions list.
Double click on the Shortcut box for that entry, and select an appropriate shortcut (either by pressing the key combination, or by selecting it from the drop-down).
Click OK.
The Go To... Dialogs:
The Go To... dialogs are provided by core NetBeans, and are available even if the QFC plugin is installed (the QFC plugin does not override them).
The Go To File dialog is ALT-SHIFT-O.
Go To Type: CTRL-O, appears to list classes, variables, and all sorts of stuff.
Go To Symbol: CTRL-ALT-SHIFT-O
For PHP projects, Go To Type and Go To Symbol appear to list the same set. As mentioned, all of these are available on the Navigate menu.
Installing Quick File Chooser from the Plugin Portal Update Center
In NetBeans:
Click on Tools, then Plugins
Go to the Settings tab
Ensure that the "Plugin Portal" is listed in Configuration of Update Centers and checked as Active. If it is not listed, click Add, give it an appropriate name, and the URL is http://plugins.netbeans.org/nbpluginportal/updates/7.3/catalog.xml.gz for versions 7.3.x. (In the URL replace the "7.3" with, e.g., "7.2" or "7.1" if you are using an older version of NetBeans.)
Click on the Available Plugins tab.
Click on Reload Catalog just to be sure you have the latest contents.
In Search: type "Quick". That should be enough to get it listed by itself (or at least on a short list).
Click on the check box under the Install column, and then click on the Install button down below.
to open a file based on its name
Alt+Shift+O.
Hit Ctrl + O to search files based on their 'Class Name'.
I think the simplest solution for this would be
ALT+f+o
This will open the file open dialog box, now you can browse through the files and open which-ever file you want or if you have the complete path to that file just paste it in the text-field which says "File name:" and press Enter
I use Ctrl + Shift + O to open this dialog for Java classes.
I don't know if this is also valid for PHP though.
If you just want to open some file based on its name, you can use Ctrl + Shift + L.
Edit:
Both actions are available in the Navigate menu.
This is old and pretty much answered, but you may also try this plugin - works for all up to 8.2:
My shortcuts different from answers above (don't know why).
To me its Alt + Shift + L, Or Navigate->"Go to File".
To search by type its Alt + Shift + O or Navigate-> "Go to Type" (you can see the shortcut in front of it)
It did not require me to install any plugins BTW. Netbeans version: 8.2
The best way to search and open file in netbeans:
Press ctrl + o and type file name you are looking for, it will search in current projects and list matching files thn you can select file and open.
Another way is to use open file fast plugin. it got two matching modes, smart (like in textmate) and exact.
The best way to open the file without any plugins is to use Alt + Shift + O, then netbeans will offer all the available files with your given keywords.
I do also believe the answer from #faisalbhagat must be the accepted answer as #Thor mentioned above!