I'm a developer of a BPM application. Our team has a simple hand-written tool, that allows to mock external systems over JMS and SOAP, also this tool allows us to call our own integrations.
However, we want to use something more extensible and bulletproof for integration testing purposes and Citrus Framework seems like a good alternative, but it is designed primarily to be executed like JUnit/TestNG tests, which is not suitable for the case.
We need an application that runs as a standalone one and allows simple configuration without redeployment.
Is this possible with Citrus Framework?
If not, what approach would you recommend for the purpose?
Thank you!
There is a side project from Citrus called Citrus Simulator that is a standalone simulator for multiple message transports including JMS. The project is available on github: https://github.com/christophd/citrus-simulator
User manual (still under construction) can be found here: https://christophd.github.io/citrus-simulator/
Related
I have a Java application with the GRPC API. And there is in the same repo a Java client library for this application.
I am using Maven as a build system.
How can I test that spans are correctly created and the app will work as I expect (i.e. instrumentation doesn't affect the application's logic)?
I tried to play with the agent for testing, but it seems that it should be configured heavily before being used as I can see in the different tests of Gradle plugins.
I have an idea that I should test this only on the integration level (i.e. set up the whole infrastructure for the tracing) but it would be cool to see the mistakes as early as possible :)
Also, I have plans to add the manual instrumentation to this app, because there is a custom Netty-based transport layer to another application and there is custom scheduling logic based on queues.
I am trying to make a monitoring system for JAVA web services. It would be a simple switch kind of system where based on the health of a service it would report 'RUNNING', 'CRITICAL' or 'UNSTABLE'. The challenge is integrating it with existing code. While calling an endpoint with the data would be the easiest, I am not too keen on going down that path because it would require too many changes to the source code. Instead I was looking at run-time injection. Your suggestions on coming up with an architecture would be very helpful. Thanks and let me know if you have questions.
EDIT: Tips on how to extend it to monitor stored procedures in an Oracle DB would be great too.
There is a common answer for such kind of question: just try JMX.
If you already use such frameworks like Spring - feel free to use Spring JMX there.
Aslo you can built your application into OSGi framework if it suits to you (here you can also use JMX layer for that).
I am trying build an automated testing framework for some of our internal web services (java) at work. Each service has a set of APIs (3-5), although this could be relatively easy to achieve, the problem comes with some APIs which do not behave as pure functions, ex: something like persistX, this could store something in a database and returns an exception incase of failure.
There is no easy way to validate since there is no output here.
So I was wondering if this could a a bit generalized, say while testing the API, the user could provide a simple plugin or script to the framework of some sort that could validate the test. This is just one idea would be great if someone can tell me some better ones or any resources about the same.
Thanks
I recommend the robot framework. It is a keyword driven framework written in python. Because of that, you can run it in the JVM with jython which means you can extend it with java code (or python, of course). I've sucessfully used it to call APIs, then verify the result by peeking into a database, or querying the file system.
It also works on the .NET platform, has a selenium module for testing the front end, a jenkins plugin, and several other tools. It's very extensible and flexible.
What you are looking at is the application of black-box and white-box testing and the tools that support both.
For the web services that return a proper response you can perform black-box testing by verifying the data in returned response. SoapUI is the best tool for this.
For the APIs which do not behave as pure functions, you do white-box testing by verifying its side-effects like persistence, event generation, logging etc. For this you like programmable tools and SoapUI may or may not be the correct option.
We do both at our work and after evaluating multiple tools/frameworks (SoapUI, RSSPec, Robotframework), I chose Spock. Why spock?
It allows you to write intention revealing tests in BDD style
We are Java shop and we want to use the same familiar language for automation as well but with simplified syntatic sugar. And spock is all groovy based.
Excellent Webdriver/Selenium 2 support (including PageFactory) with Geb
It is built on top of JUNIT so all the plugins of JUNIT can be leveraged (code coverage, hudson/jenkins integration, etc)
Lot of webservice APIs and XML DSLs (no need to work with XPATH for simple scenarios)
Simplified setup (unlike robotframework it doesnt require python, jython setup)
etc....
I am looking for a plugin that helps developers create multithreaded network applications that works with either Eclipse and/or Netbeans. Should allow for functionality such as:
Graphical modeling of callbacks
Configuring executors
Creating custom SSL factories
Wizards for creating various filter streams
How about a framework? JBoss Netty (http://www.jboss.org/netty/) and Apache MINA (http://mina.apache.org/) are very similar in function and will both facilitate the sorts of things you mention. As for an IDE plugin, I don't know of anything but doubt the value of such a tool.
We're migrating our application into a Java EE container, and looking for tools to use for unit testing (and integration testing) our migrated app.
Our requirements include:
Ad-hoc testing: the ability to run tests manually, on demand (to be used by developers while developing code)
Batch testing: the ability to run a large (and growing) set of tests regularly
In-Container: integration tests that use EJBs as they are deployed in the container
Unit testing: Testing of classes not necessarily inside an EJB context
Nice to have: Simple to set up, integrates with ant/IDE
No requirement to test Servlets/JSPs - only POJOs and EJBs
What are you using to achieve testing in Java EE environment? What technologies/setup have you deployed?
My research have uncovered Cactus and JUnitEE: have you had success setting them up?
We use normal JUnit for both unit tests and integration testing. We switch between the two using a VM argument, and have the tests annotated with markers for direct vs. server. We do have a custom TestSuite class though that finds and runs the tests based on this information, as it was easier and less error prone than manually maintaining which tests to run.
In our case we use Spring remoting to talk to servlets and EJB's (via the servlets), and testing both cases is simply a separate launch configuration within Eclipse.
We used JunitEE a few years ago, but eventually gave up on it in favor of just using JUnit throughout. This enabled us to have developers do all their testing without a server at all and run both unit and what I would call low level integration tests in their IDE. Then we let the build machine run the same integration tests against the same code now deployed in the actual server. This makes the development cycle much faster as we rarely need to run the server and deploy service code.
JUnit(EE) is what every major project($100mil+) I've supported has used. It's really a fantastic tool and knowing how to use it is invaluable when/if you decide to look for other job opportunities.
I supported a government financial system that used no unit testing but after a lot of pushing we finally implemented JUnit. The system I work on now is a large government agency modernization and we use JUnit for all of our unit testing. The two large firms supporting the modernization have essential made JUnit the standard across all of the sub projects. We've got ~200 developers using it without a hitch.
It's quick and easy to set up and once you understand it and you can leverage the features it will demonstrate how invaluable it is.