easiest Automated testing tool in Java - junit

I want to learn quickly like in an few hours an automated testing tools.
Does somebody know any automated testing tool which is very easy and how can we do same automation in java. I want to use Junit

I think you are on the right track, JUnit is definitely your best bet for Java testing automation. You can learn more about JUnit and even build a quick example application here.
Other tools to look at:
Cactus
EasyMock
Fit
Others that can be viewed here.

For preparing test dataset, consider Beanmother

Related

Good Unit Testing Options in FlashDevelop

I'm new to AS3 and Flex, but I am creating a mobile app with them in FlashDevelop. I want to add some unit tests, but I can't find any really good frameworks or documentation on it. I saw a little bit on FlexUnit and AsUnit, but both seem to be a few years old, and there isn't much documentation on using them in FlashDevelop.
Is there a good framework I can use for unit testing here? Even if I can't test the UI layer, I'd like to at least make sure my backend functions work correctly.
If you are testing backend functions, then you generally want to use the testing framework of whatever backend you are using. If you want Flex to test your backend functions, then you aren't Unit Testing, you are Integration Testing. While FlexUnit seems old, it still performs well at serving its purpose. The usage of FlexUnit should be independent of your IDE, you may just have to do more typing.
You can try to use the Flexunit4.0 for testing the business logic on the client side mixing it with the Mockito. None of these actually support testing the UI.
i've never tried to test the backend services with the Unit testing because of the authentication issues, but we created another testing UI for testing the services, This UI has a tons of screens, each screen to test different services.
I've seen that there is a ServiceBrowser for amfphp, i'm not sure if this can be used for Java or other platforms.
Other ways of testing the UI is by automation testing, use flexmonkey, selenium for that.

Junit : which is the best and easy frame work for testing JSP and Servlet

which will the best and easy frame work for testing JSP and Servlet. I
am bit confuse among HttpUnit and cactus Please help.......
Thanks
Without much background it's hard to know your requirements. What are you trying to do? Is this old school Java or some offshoot (Groovy et al.)?
At its most basic you can test your servlet using Junit and EasyMock (mocking the httpservletrequest/response and validating interactions).
As for front-end testing, I'd investigate webdriver. That'll allow you to interact with the page using HTMLUnit, Firefox, Chrome, etc. There's a good Groovy-based abstraction of webdriver in the form of Geb (bookofgeb) that I'd also suggest for building maintainable tests.
I'd avoid unit testing (in the pure form) "views". You shouldn't have any form of complex code in your view so the need for unit testing should be negated. (And unit testing views are a PITA for maintainability.)
Review your requirements and tell us your objectives.

Which framework works best for Enterprise application testing in distributed environment?

I am working in an enterprise with some legacy applications, which are quite coupled.
Integration test is thus very important. I am looking for a distributed testing framework, or a combination of them that QA team and development team can both leverage on. For "distributed" I refer to the many environments for testing, while a single application itself is not a distributed system.
The following criteria might not be the ideal model, but kind of requirement and expectation of the tool to be developed.
Such framework should be :
open sourced
community support to learn, maintain and extend :)
distributed
allow tests to be execute in multiple environments.
since test cases may change quite often, it should be managable to distributed those test into target machines with target codebase to run.
I am checking out [STAF][1] on this.
allow integration tests
I am looking into Camel testing. we have some existing "simulator", "mock" to stimulate some applications behavior.
framework with easy-to-use dependency injection / mock will be very helpful..
with WEB UI, wich is a single place that can
- all testing results are shown
- able to trigger test
- able to see testing definition
Human readable and configurable acceptance testing definition
Testing language should be in a readable DSL
I wonder is framework like FitNesse a good choice as I did not figure out a way to test it distributed.
For Citrus I am concerning XML is hard to read
Some current frameworks
My team has been suggesting JSystem, while it is possible to distribute tests, there is no web GUI and
my major concern is its development has been stopped since 2009
I looked into many frameworks as mentioned,
Grinder - seems better suite web load testing?
JMeter- this seems to be closer, but also focused on load test?
more on background: most developers are familiar with JAVA and currently we use Hudson to run JUnit tests.
And finally I am also thinking a more conceptual issue, should xUnit test, integration test, acceptance test all being separated? xUnit test should be stick with code base? perhaps this worth another question, but with that in mind I am not sure I am looking for the right thing.
I will greatly appreciate if you can give me some comments on the thought / suggest some frameworks. Thanks a lot in advance.
I will suggest you to use Jenkins Framework.
Open source
Can be used for different environments
I myself working over Integration Testing using Jenkins so suggest you for this.
Web UI is very interactive.
Large variety of plugins is available and development is still on.
Write some ANT, MAVEN scripts you can get your job done through this.

ActionScript: Automated Test Frameworks

I've just been tasked with finding automated actionscript frameworks. Can anyone offer the best out there? I'm just beginning to write the code for my project. Is it better for me to keep my MXML and AS in separate files so I can more easily integrate with any frameworks....or does it even matter?
Thanks for any helpful tips!
FlexUnit is a good unit testing framework.
For continuous integration, I've used jenkins, maven, flex-mojos. That will require a bit more work to setup, but it is well worth the effort.
If you need functional testing, I haven't used it myself, but I have heard that Flex Monkey is pretty good.
I'm a big fan of AsUnit I've used it in combination with both Hudson build manager and TeamCity with great results

selenium 2 and junit

Do most people use there selenium (in my case selenium 2 with web driver) tests with JUnit? I personally do not and was wondering if I am in the minority. I tend to write all my own classes and exception handling and have everything write to a database for reporting on results.
The only problem I see with your approach is that the more code you write yourself instead of relying on existing third party libraries, the more maintenance you will have.
If you have the option of using third party, your should (in most cases) integrate it instead of writing something yourself.
If you want a testing framework but feel like JUnit is too restrictive, you might want to consider using TestNG. It is designed for integration testing and has features that make GUI automation easier.
At the end it comes to your personal choice,if your test code is small and easier to maintain and keep track of.For enterprise-level web application having multiple modules to be automated,we have to choose some sort of test framework for easier automation and reporting purposes.
I personally prefer TestNG as it is code is clutter free and more readable.Cheers!