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.
Related
My thought is that "JUnit is a framework for testing java applications and is typically implemented as plugins (to popular IDEs)", but can't it also be considered a standalone testing tool if implemented as a standalone (although it might be a stupid idea)?
No, JUnit is a testing framework.
You would still require a "runner" to run your JUnit tests, be it Maven or a similar.
There are stand alone runners available so you can execute tests without build tools or an IDE.
I was hoping you could point me in the correct direction. I am trying to find an automation tool for an internal Chrome site that I, as a tester, can use to create tests. I would prefer some kind of recording type option and free or very low cost. And it MUST work on Chrome. Our app doesn't work with any other browser
Here's what I've looked at so far:
I am not going to have time to learn any new languages or have access to a developer, so Cucumber is out (this was the company's first choice).
I found the Ghost add-on that records, but it needs to open the firewall to be used. BIG no no.
I looked at sikuli, but we can't have a dedicated screen like that, although it might still be a last ditch option
TestComplete might work, but it costs money. I am going to download the free trial, but the justification may not be enough to get the company to spend the money
SoapUI is something I've worked with before and I know that only the Pro is helpful to a non-programmer like myself.
Any ideas are welcome.
Thanks!
You could look at Robot Framework. It is a keyword driven test automation framework and it has good Chrome support via Selenium. Web page has examples how to write tests for browsers.
Robot Framework is open source and free. Writing tests with keywords looks more difficult than using record-playback tool. However, once you have several tests, managing them will be easier with keywords.
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.
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.
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!