Multiple folders to reports in TestNG Eclipse plugin - eclipse

I'm running Test Cases with TestNG Eclipse plugin. How can I specify a distinct folder as output to the HTML reports by configurating testng.xml?
I've seen Cedric's answer to this very similar question (http://stackoverflow.com/questions/5401746/generating-testng-reports/), but I couldn't obtain the same on TestNG Eclipse plugin. I've tried , and another bunch of similar things I've seen in the doc and nothing worked.
Extending the question a bit, we want to be able to run tests repeatedly and pick at any time the last n (say 20) reports, is it possible? It happens sometimes we use TestNG to do a lot of exploratory test. As some fails are rare and hard to repeat (and in the first approach they may not be predicted as such), sometimes the "explorer" just re-run the test and lose that inconstant fail.
Thanks in advance to any answer to the primary or a bit extended question, Regards, Henrique

try by passing argument -doutputdir in arguments tab

Related

Eclipse messing up excluded filter?

Eclipse is setting constantly excluded filter in build path config to **, which causes resources to be excluded from deployment. Anyone aware of this issue, and how this can be prevented? Any thoughts?
How i said in the comments of your question i did not verify any of both approaches and i only think/hope they could lead to a solution rather than i know it exactly.
First approach:
Since you handle the entire process of compilation and packaging via Maven i assume you collect required ressources with Maven only (and that if you filter out certain ressources you would do that with Maven only). In that case i would try to disable all of the eclipse filters to be included into the build path - which i would expect as the behaviour if you disable this option:
(i once experienced eclipse added a "*"Filter to my Type Filters hence i wasnt able to find anything on typesearch Ctrl+Shift+T anymore - so my hope is a similar behaviour when it comes to your filter-all-resources filter"
Second approach
Actually i think that this approach will only affect the view rather than the build/ deployment process but hey its eclipse - you just never know so i guess its worth a try:
In the following screen you should see any filters known by eclipse - i assume you will see the . Filter there as well and be able to unselect it:
I guess its worth a try - good luck ;)

Running multiple run configurations

I have two run configurations and I would like to run the first, then, after that is done, run the second. Can I do that in Eclipse in a single step? And, if so, can I also assign this to a keyboard shortcut?
There is a similar Stack Overflow question, though that one is slightly different I think you can use the same solution. It looks like, according to the Eclipse Help page about Launch Groups, that you can define a sequence of launches in a group. The drawback is that you must install CDT to get this feature, but it's not only for C/C++ applications.

Groovy debugger out of sync

I am having a difficulty while attempting to debug some code in grails. It is difficult to put into text, so I have posted a screencast showing exactly what the problem is here. In short, while I am debugging the debugger starts jumping from place to place and not following the program logic I have in place. The only other similar question I have found is a year old, had no solution, and can be found here.
The best guess I have so far is that the debugger is displaying the text I have typed in, but is actually executing an older version of the class file which it has cached somewhere. Therefore, I tried:
cleaning the project
manually deleting all of the class files from the target folder and from the target-eclipse folder
Searching my entire hdd for additional files with similar names
removing my project from the workspace and re-adding it
closing and reopening the IDE
grails refresh-dependencies
Importing the project into a new IDE (I was using GGTS, I switched to IntelliJ)
None of those solutions had any effect. I realized that the issue was in a .groovy file, and I was writing almost pure Java, so I deleted the .groovy file, and re-created the class in a .java file. That solved my problem. Unfortunately I am having the problem again, and this time it is in a controller that heavily relies on the grails framework, so that solution is not an option. Other than also being in a .groovy file, another similarity is that the code breaks on an if statement.
My next steps:
Verify that the application is not executing the code I see by using print functions to monitor actual execution flow.
comment out the entire function and re-add functionality one line at a time to see if I can see what breaks it.
Delete the .groovy file, and re-create it as another .groovy file.
Any help is appreciated, and since I can't find any answers online I will continue to update this question as I learn more.
See my comment on the jira issue that you raised. You have found a problem with the groovy compiler and how it calculates line numbers. This is not a problem with executing the wrong class files or using a broken debugger. The debugger is doing exactly what it is expected to do. It is the compiler that is providing erroneous line number information.
The next step, as described in the issue, is to provide a simple project that recreates the bug. I tried to do so myself, but could not. So, please supply something that we can work with. Then we can notify the groovy compiler team.

Automating Eclipse tasks

I'm currently looking for ways to automate some tasks in Eclipse.
For instance, let's say I have a couple of ant files that I'll want to run a couple of times per hour. Being able to assign a hot key to each one of them, so that I could easily run them without having to click, bring the context menu up and click again would bring joy into my life.
Other example would be build/run configurations. I have a couple of them on my project and I'd love to have a way of running each one of them with a different hot key configuration.
Moreover, the very nature of a project I'm currently working on involves a lot of experimentation and trying, so having to click and use my mouse a lot is definitely driving me insane. There are other similar things that I would like to get automated as well (for example, each time I do a commit I'd like to also run some command over my project's folder, etc).
Is there some tool for Eclipse(or outside it) that'll somehow allow me to automate these kinds of tasks? Would Vim for Eclipse help me anyhow?
After some years coding I feel like I have hit a stone wall. I came to the conclusion that I am losing way too much time with my mouse. Yes, I know that a lot of Eclipse actions have correspondent hot keys, but a lot of others don't. I want the ultimate solution !
There are several solutions:
Use a console. Consoles allow to remember the last commands (on Unix, you can even search). So instead of mouse-fu, it's Alt-TabUpReturn
There was Eclipse Monkey to script Eclipse. Not sure if it still works but it might.
On Sourceforge is Practical Macro. No documentation that I could find, though.
EclipseShell might also work, not sure.
Update (Year 2022). Aaron has provided many options in his answer. It seems any of those are working. I am going to try the old ant builder.
https://www.vogella.com/tutorials/ApacheAnt/article.html

Easiest way to know LOC on Eclipse

I am working on a project using Eclipse 3.4.2, and would like to know how many Non Comment Lines of Code (NCLOC) it has.
It is OK to be a simple plugin, but I don't wan too much bloat. My machine is already slow the way it is.
Use Eclipse regular Expression: Search->File, check Regular expression.
LOC: \n[\s]* (without blanks)
Comments: [*]+
you can subtract to get NCLOC with selected resource
You could try a metric plugin (like the ones I mention in this SO question)
That, plus a good eclipse.ini (making your eclipse run with the latest JDK), should make your configuration able to display what you want in a timely fashion.