Skip to main content

Run FF profile from IDE

  9 posts   Feedicon  
Replies: 8 - Last Post: April 11, 2013 11:05
by: AlexAlpa
showing 1 - 9 of 9
Posted: April 07, 2013 10:43 by AlexAlpa
Thanks for Thucydides! It's verry cool test fremwork)

I am new in Thucydides! My question is, how i can run test from my IDE in FF profile? I can run test from maven use -Dwebdriver.firefox.profile=HOME_PROFILE, but i can run single test (for example, to debug) in FFprofile from IDE. Can you help me, please?

Best regards,
Posted: April 09, 2013 08:00 by Alexey
What IDE do you use? And what exactly is the problem?
For instance, in Eclipse you can setup a Maven build confiuration and run it using the same parameters as in command line.
Posted: April 09, 2013 08:44 by AlexAlpa
I use IntelliJ IDEA. I tried to set up Maven for run single test but I can't(
But how I will be debugin? Break point doesn't work if I run test from MAven
Posted: April 09, 2013 11:55 by AlexAlpa
Thanks for council, but may be a solution for decide this problem in Java code
Posted: April 11, 2013 04:55 by MichaelT_
Once you have created the project via maven, you should then be able to import it in as a Maven project into IntelliJ, the following steps is how I did it the first time:

I first ran the mvn archetype generate for Thucydides + JBehave:
mvn archetype:generate -DarchetypeGroupId=net.thucydides -DarchetypeArtifactId=thucydides-jbehave-archetype -DartifactId=SampleJBehaveProject

Then to Import the project into IntelliJ as a maven project.
1) File > Import Project
2) Select the location of the project. Click Next
3) Select "Import project from external model" and select Maven. Click Next
4) Check the Root Directory etc (defaults should be OK. Click Next.
5) If you've installed Maven 2.2.1, use Maven 2 profile, otherwise Maven 3. Once selected, click Next.
6) Click Next
7) On the SDK page, add one if none exists, otherwise click Next.
8) Use the default name (or change if you want). Click Next.
9) Click Finish.

CD into the project directory, then run "mvn clean install"

Once you have the "target" folder under your project you should then be able to do a "Run > Run AcceptanceTestSuite" in IntelliJ. To debug, then of course select "Run > Debug AcceptanceTestSuite".

Using these steps I have set up a few projects and have been able to successfully debug in IntelliJ.

Hope that helps.

Posted: April 11, 2013 07:11 by AlexAlpa
Thanks a lot))) but this very help in Thucydides + JBehave, but I use Thucydides + Junit. Thath why I can't run single test in FF profile, i can run test in FF profile only from maven
Posted: April 11, 2013 07:27 by MichaelT_
Sure it's for Thucydides + JBehave, but if you import your Thucydides + Junit project it into IntelliJ as a maven project then it should run from IntelliJ (just as it does from Maven) just the same.

Once you have run your project once in IntelliJ, then you can set properties etc for the JUnit Project (or you can set them as Defaults). If you want to pass in properties (like you do on the command-line) then you can go to "Run > Edit Configurations", then at the top you should see "JUnit" (if you don't have this and you only see "Defaults", then run your project and repeat the previous steps). Under VM Options then you can add -Dwebdriver.firefox.profile=HOME_PROFILE

Click Apply and OK and this will run with the firefox profile that you specified.

Posted: April 11, 2013 11:05 by AlexAlpa
Yeeep))) Thanks a lot!!! This is what I had to
showing 1 - 9 of 9
Replies: 8 - Last Post: April 11, 2013 11:05
by: AlexAlpa
Please Confirm