Beginner cucumber query-How to create a feature file after installing cucumber eclipse plugin - eclipse-plugin

After installing cucumber eclipse plugin from the link http://mrpotes.github.com/cukes-jvm-eclipse-plugin/update-site, I have restarted eclipse and have been trying to create a cucumber feature file .
I am trying to create my first feature. But when I select File - New - Project or File - New - Other, I cannot see cucumber feature listed so that I can select and create a feature file.
Please help me with the steps to create a cucumber feature file in eclipse.

I don't use that plugin, but a feature file is just a text file, why don't you create one of those?

Install latest version of Eclipse in which "Install New Software" (Help->Install New Software..) option is available. In that do the following steps:
Help->Install New Software..
Install window will open, in that window click Add button
Add Repository window will open, in that type the following
Name : Cucumber
Location : http://cucumber.github.com/cucumber-eclipse/update-site
Click OK
After restarting the eclipse you can create feature files.

Related

Contents of .feature file isn't recognized in intelliJ

I wrote feature files in a project in IntelliJ according to the cucumber syntax. This files worked in another computer. I added the cucumber-java jar files and also installed the Gherkin and cucumber plugins, but still feature files aren't recognized as they should be.
What could be the problem?
So i use IntelliJ 2018
1) go to Preference
2)in open tab search "File Types" and search for text
3) in Text inside "Registred Patterns" delete "*.feature"
4) then search Cucumber Scenario and add "*.feature"
Steps I took to get .feature files recognized. I know that you've probably done this already, but it might help checking the steps again. If all fails, you could try to reinstall the plugins.
Created a new Java project
Created a new file with the .feature extension. Because the plugins were not installed, got the message "Plugins supporting *.feature files found." with the option to install the plugins
I didn't use this option because the suggested plugins were not what I wanted (check below image):
Instead, I've opened Settings > Plugins > Browse Repositories and searched for Cucumber for Java
When trying to install this plugin you will be required to accept the installation of Gherkin as well. Make sure that after accepting, both plugins are selected.
Restart IntelliJ and you should see the feature files recognized:
Hope it helps!
After installing plugin if you till face problem as i did, my feature files are not getting recognized because of groovy
therefore I manually set
File>>Settings>>Editor>>File Types
click "cucumber Scenario" and Click + to add .Feature in Recognize Patterns.
First make sure you have cucumber for java installed, if it is installed follow the below stpes,
1) Create a new feature file, like <test.feature> , after file creation a dialog box pops up
2) Select cucumber scenario in form the list and click Ok, there you GO.
Essentially two things are required to get cucumber feature recognized as expected type.
After adding cucumber-java dependency in pom.xml
You have to add Cucumber plugin also from >
Settings>Plugin>MarketPlace>Search for cucumber for Java and install it
This will also ask you to install Gherkin as a Dependency
Select Yes>> Restart ide
Now you have to change file type from settings >> to cucumber scenario.
Note: you wont be getting Cucumber scenario as recognized type until done above installation.
Select cucumber scenario and Add + wildcard for it as-*.feature

How to import COM4j as Eclipse Plugin?

I am following the guide shown in https://molteni.wordpress.com/2012/10/16/connect-hp-quality-center-with-java-using-com4j-tutorial/ to generate resources of COM4J.
This is how the COM4J folder looks like
I tried to create an Eclipse plugin based on it and show as below
However when I added the plugin as one of the dependencies of my application I am unable to import the file.
I get the following error when I tried to search it through "Open Type" in Eclipse as follow
What steps am I missing here ?
Usually it is done like this: in Eclipse go to File ->
New -> Plugin Development -> Plugin From Existing Jar Files
Though it might not help in this case: please see this issue: https://java.net/jira/browse/COM4J-57
It sounds like you have not specified which classes are exported by the plugin.
Open the MANIFEST.MF editor for the plugin and select the Runtime tab. In the 'Exported Packages' section click Add and select all the packages which should be available to other plugins.

What is the command line option to pass into the activator framework to generate an intellij project?

I'd like to generate the intellij project files from a typesafe activator project via a script - is there a command line interface or command i can use for this purpose?
(i wasn't able to find directions for one online, or in the usual help locations)
Please note that since IntelliJ IDEA version 13 it is no longer necessary to generate files for IntelliJ IDEA. sbt support is now build in, you can open/import the project by opening your build.sbt with IntelliJ IDEA: http://blog.jetbrains.com/scala/2013/11/18/built-in-sbt-support-in-intellij-idea-13/
Remember that Activator is just an sbt wrapper with optional UI mode. So what you want is sbt-idea:
https://github.com/mpeltonen/sbt-idea
The Activator UI will auto-add this plugin and then (on the Code tab) it has an "open in" menu item to generate the intellij project.
If you want to script it, there are two steps:
add the plugin (either drop an idea.sbt in project/ directory or put it globally in ~/.sbt/0.13/plugins)
run activator gen-idea

How to update IntelliJ IDEA testing-plugin to TestNG version 6.8?

Currently, I am using TestNG 6.8 with Maven, but when I run the test through the IntelliJ IDEA plugin, it uses an old version of TestNG.
How can I make IntelliJ IDEA (version 11.1.4) work with TestNG 6.8?
Download the complete TestNG 6.8 zip.
Delete IDEA\plugins\testng\lib\testng-jdk15.jar.
Copy testng-6.8.jar from the downloaded zip into IDEA\plugins\testng\lib.
For IDEA 12+: replace testng.jar instead of testng-jdk15.jar.
Here's a better way: In "Project Structure" -> "Modules" -> "Dependencies", click the left bottom "+" to add a new dependency from either pre-downloaded jar file, or library from Maven repository. Remember to remove the old TestNG version, or move the new version to above that.

Cannot reference jdbc.SQLServerDriver in Eclipse (ClassNotFoundException)

I am trying to use the MSSQL driver for JDBC. I have followed the instructions on how to add an external JAR file to the Eclipse Windows IDE as follow:
- Download the installation from here http://msdn.microsoft.com/en-us/sqlserver/aa937724.aspx (Microsoft JDBC Driver 4.0 for SQL Server)
- Extract the zip to a file location I have extracted it here (c:\MsJDBCforSqlDriver)
- In Eclipse Package Explorer right click your project -> Build Path -> Configure Build Path -> Java Build Path -> Libraries Tab- Add External JAR file and then I browse to
"C:\MsJDBCforSqlDriver\sqljdbc_4.0\enu\sqljdbc4.jar"
- I then view the successful reference as in image below including SQLServerDriver.class
When I try to execute Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver") I get a ClassNotFound Exception as below:
I tried all suggestions I could find on Google including setting the classpath in Windows Environment Variables.
Under the Run -> Run Configurations menu item you should find an entry for a Java application with the same name as the class that contains your main() method.
Have a look at the classpath tab. You should find your project listed under user entries. Expand it and see if the Microsoft JDBC Jar is listed.
The class path you use for compilation need not be the same as you choose for runtime, though Eclipse usually mirrors any changes to your build path to any launch configurations.
Your spelling and case for the package and class names look correct (Java is case-sensitive on names).
And yes, learning Java and Eclipse will take effort - Eclipse is quite different from other IDEs and it takes time to get to know it.
I found the answer here: http://code.google.com/p/android/issues/detail?id=27490
Seems like includes under Referenced Libraries is not available at runtime and I couldn't see how to change this in my version of Eclipse
"
Reported by fred...#mobileinteraction.se, Mar 22, 2012
Host OS: Windows 7 x64
SDK tools version: 17
Eclipse version: 3.7.2
ADT plug-in version:17.0.0v201203161636-291853
Platform targeted by your project: 2,2
Version of the platform running in the emulator: 2.2
STEPS TO REPRODUCE:
1. Create a project that uses external jars (in my case android-support-v4.jar ).
2. Added the android-support-v4.jar using Properties - Java Build Path - Add External Jar. Have the Activity extends from FragmentActivity.
3. Clean and run project
EXPECTED RESULTS: Application would run launching the FragmentActivity
OBSERVED RESULTS: Application crashes, android-support-v4.jar is placed within "References Libraries" and thus Android can't find it at runtime.
SOLUTION:
Manualy create a folder /libs within your project, copy the android-support-v4.jar to that folder and the ADT will place it under 'Android Dependencies' and it works.
This is the case for all external jars added using Properties - Java Build Path - Add External Jar.
"
Adding the JDBC driver of MS SQL Server to Eclipse:
Download the JDBC driver and uncompress it
Secondary click in the root of the Eclipse project and go to "Properties".
Now go to the section "Java Build Path - Libreries" y then click "Add External JARs".
Search the "sqljdbc.jar" file in the directory where you unpacked the downloaded driver, double click y finish pressing "ok".
I faced the problem and then solved the issue i.e. If You are using the Tomcat as a server for your Web application, the same Exception was coming as the Driver was unavailable to the project, later I put the jar file (sqljdbc4-2.0.jar) into the WEB-INF/lib folder then it was working