Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
We are developing an application that involves a lot of different tests where each test lead the users to a number of steps. We are thinking of using a state machine framework to capture the states/transitions out of the code. We are also thinking of using rule engine to supplement on the rules. Anyone has experience with any state machine framework that would work with JBoss and/or Java? Thanks in advance.
-nguyen
jbpm does this and integrates well with jboss. In my experience, it's pretty easy to use and is powerful.
You might want to look at StatefulJ. It is built off of Spring Data for Persistence support and the State Model itself is defined using Annotations. This approach makes it easier to set up and maintain vs. XML. Regarding rules - I've used Drools in the past and seems very well supported.
Disclaimer: I am the author of StatefulJ
if you are building some screen to screen transition - based system, then you should definately check out Spring WebFlow http://springframework.org/webflow
I have had very good experiences with using ragel to build easily maintainable state machines. The resulting java code is of very high quality. However, it is purely a state machine generator with no specific usage intended, so you might find other solutions that will more seamlessly work in a web related problem domain.
Maybe you can take a look at JBoss PVM. It is still in alpha, but can be used to model any type of state machine. We are also looking into it for gui transitions.
http://www.jboss.org/jbossjbpm/pvm
Try Activiti, seems a lot of people are using it.
http://activiti.org
For the rules engine part you could use Drools, of course.
Have a look at StateBuilderJava, a state machine code generator that transforms an XML description of a state machine into an extended version of the Java state pattern. It supports all UML semantics: state machine can be hierarchical, concurrent and asynchronous.
Each test scenario can be modelled with a state machine Xml description, the code generator writes the state pattern of your behalf, which is tedious and error prone if done by hand.
The other advantage is to visualize and edit the test scenario with a graphical tool.
This allows to quickly implement and document a set of test scenarios.
In the examples, a test suite of an XMPP client has be written to illustrate how state machine code generators can be used to write complex test scenarios easily and quickly.
Disclaimer: I'm the author of these software.
I've used activiti.
It is the best framework.
It is a light-weight workflow and Business Process Management (BPM) Platform.
Open Source and works on any Java Platform or cloud.
All one needs to have is the knowledge of BPMN , Maven , Spring and Activiti.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
Our company is trying to adopt UI test automation. They showed me their previous attempt on Test Automation which was basically what you can expect from over worked QA engineers who are asked to create a test automation project alongside their other duties in short frame of time. From what i saw it had many flaws and wasn't successful. I am beginner in this field and i would like to find out about,
Any detailed guide of best practices in UI Test Automation
Any github repo for test automation project done by some
respectable company in software development showcasing best practices.
The reason i am posting here is that most of the guides i found online was basic or lacking details. Also it's impossible to find test automation project done by some software company. If any of you guys work in a company which has public repo kindly share it here that would be mighty helpful.
You probably aren't finding stuff online because typically those framework materials represent time and investment. They're either sell-able material (e.g. consultancies that have generic frameworks) or bespoke for a client (which e.g. expose internal system workings).
An automation framework starts with some requirements gathering. Loads of things to consider - Some sample thoughts:
Do you know what you want to test?
Is it purely web? Is it thick client? does it involve mobile? a mix and match?
Are you involved with the dev team? do you know what's been tested at the different levels before you get to the UI?
Do you have the right skills to follow this through?
If you google "automation framework requirements" you'll get a lot of ideas.
This article [disclaimer! - i wrote it] talks about automation problems you encounter from the top level without into the code. I'd consider most of those pretty good practice and there are parts of it you can plan for early on.
Taking a bit from the article:
Automation needs to test the right things
Automation needs to just run
Automation needs to run well
It uses examples from my career of things I've seen done wrong and how to correct them.
Beyond that....
Modern automation typically steers you towards the test automation pyramid (not my article this time).
When you get to the lower level, general programming rules are important. I can't give you a direct steer on a framework you've not designed but simple rules help:
DRY
YAGNI
SOLID (as much as you can)
Final thought here is you don't have to build a framework.There are generic open source frameworks out there which can get you started.
Make sure that application is in Regression stage
Automating and stabilizing tests take a lot of time
Don't try to automate everything in the beginning. Automate the most important tests. Flows which are followed by most of the people on the Website.
Decide the framework - data-driven or hybrid or POM
The decision of which framework to use saves a lot of time in the future. Data-driven is most simple and easy to change as well. POM and hybrid are complex but can be more reusable.
Look and understand some existing automation frameworks before you choose a new one.
Decide on the type of reporting you to need
Using Selenium for automated testing is a learning curve. It’s not as simple as copying from a working example. This is an article on Selenium automation testing to help you get started with learning the best practices. When beginning your journey with Selenium, identify a small UI feature to automate so you can familiarise yourself with the setup of required components, and how to run and manage the test. Try start with testing something like a login process, after which you can create more tests that incorporate more UI functionality once you fully understand the whole Selenium/Java environment.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 months ago.
Improve this question
I’ve been having issues lately because my dependencies has been updated to use netty 4.1 and Gatling has not been updated for a while, and still work only on Netty 4.0.
Anybody knows any alternative to Gatling to create similar Simulations and scenarios for the performance test to be run automatically in my Maven life cycle?
If you look for something code-based it would be:
Locust
Grinder
For UI and/or XML based scenario definition you can check out:
Tsung (this one can be reliably run on Linux/Unix only)
Apache JMeter
Check out Open Source Load Testing Tools: Which One Should You Use? to learn more about the aforementioned tools and decide which one fits to your most.
As a nice replacement for Gatling I would recommend you to check the Locust. The good thing about the Locust specifically for you is that it is code based performance testing tool which does not enforce you to write the tests only in a specific programming language like Python. Because if you used Scala before, you might be more comfortable to switch to something like Java or even Kotlin while writing your tests which is more than doable using Locust framework. You can find the handy tutorial by this link:
https://www.blazemeter.com/blog/locust-performance-testing-using-java-and-kotlin
Here's also a benchmark comparison of different tools.
If you are javascript/Ecma familiar k6 does the job.
Apache JMeter is a known alternative to Gatling.
It is frequently updated (at least 2 major releases per year) and has a strong user base and a lot of commercial offers.
There is a Maven Plugin that is being recently much more frequently updated, there has been 4 releases in 2 months.
Look at code coverage in more details.
k6 is a good alternative, if js is not a problem for you. https://k6.io/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
How far a manual tester can upgrade himself to learn automation testing(java, selenium webdriver, testng).
which programming will be easy for stepping into scripting for beginners
You can upgrade yourself as much as you desire. There might be limitations on how quickly you can do it - due to your ability to find out time, level of interest and how things are at work.
In my experience, like any other language (french, german, hindi, etc.), each programming language has its semantics and syntax. The more time one spends practicing them (writing small programs, not reading from a book) the quicker one learns the language.
Being widely used and around for a long time, the support and learning avenues available for Java are much more so the process of getting help might be easier.
Java is also very helpful if you are trying to pick up selenium webdriver.
The task and scope of learning a scripting language becomes very specific when trying to learn it for automation testing. Usually, you will be able to get through solving fairly complex issues if you master the following concepts in Java:
OOP’s concept – Class, Objects Polymorphism, Inheritance and Encapsulation
Java Programming essentials- Object Instances, method overloading/overriding concepts and packages
Control Statements – While, do-While, Switch, If statements.
Looping statements - Helpful in scenarios like, iterating through a large table to find a record that you want and running the same test for multiple number of times
Arrays Concepts.
Java Collections Framework – ArrayLists and HashMaps – This will help us in maintaining a collection of data. Particularly useful for scenarios where you need to compare the data from Web app UI with the DB. [OR] From UI to another UI
File Streams – Used for externalization of data through CSV, Excel or Java Properties file.
Threads and MultiThreading Concepts – This will be helpful when trying to run scripts in different threads that will help in achieving better performance.
Easy Answer: Keep going to Stack Overflow. Read as much as you can, then go try it.
If you want a start, these are good to read up on:
Test format: TestNG
Text Editor: Visual Studio Code
Ruby Application Testing:
RSpec, Capybara, Selenium, Cucumber, Nightwatch, etc... etc...
React Application Testing: Jest
Java Application Testing: Apache Maven (Makes setting up the project easy), Java, Selenium
CI/CD: Jenkins
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
We're developing a data heavy modular web application stack with java but have little expert knowledge concerning tests. What we currently do is using JUnit to run a mixture of unit tests and functional tests. I described the problem in more detail here.
Now we decided to set up standards early on, on how to test our modules and applications so we'll need to read up on the principles and best practices of testing in general and in the java spring environment in particular.
What I'd like to have covered are the definitions, use cases and reasoning behind the different kinds of tests from unit test to scenario test, or as google calls them: small, medium, large tests. Like I said, we're developing a data heavy web application.
I'd like to be able to deduce from the book how necessary and how useful each testing stage is on which corresponding level of our application (core, database access, security module, entity managers, web-model, web-controller, web-view)
It would be nice if the examples in the book are directly applicable to our application stack. We're using spring, JPA(hibernate), JSF, spring security. For testing so far we're using the basic Junit and some powermock. So JBOSS, Seam or Java Enterprise books are not so usefull.
If there are great articles on the web that paint a clear picture and really do help, feel free to share those as well (I can use google, SO and wiki myself, so please only articles that you actually read and deem very helpful), but a book would be nice so I can read up from the basics and don't have to piece it all together from various articles and questions.
Thanks!
Edit - books we ordered
Just started reading Growing object oriented software guided by tests and I already like it a lot. Not for the total beginner but shows how to develop test driven with agile techniques. Really cleans up old ways of thinking about software development.
We also ordered xUnit Test Patterns: Refactoring Test Code to get an idea of how to best unit test the different areas in our application stack. Got this recomendation twice so I'm hopeful it will be helpful.
Take a look at the resources under this answer. I highly recommend the first three books, the first two directly address your "levels" questions. The first is more focused on specific tools, while the second is more conceptual.
Book recommendation: JUnit Recipes - Practical Methods for Programmer Testing
Tools: JUnit + Hamcrest + Mockito
And you're using Spring, check out spring-test, it offers some great facilites, Spring Testing
Hate to give you a snippet of an answer (as you've said you want a solid guide) but I can't really recomment any books. Best practices should involve TDD though. It's much bandied about but it aids regression and eases the mind when those ad-hoc quick requirement changes come in (when you know you've a solid codebase).
Additionally, you may want to see if BDD (Bean Driven Development) is right for you. I mention this as you may not stumble upon it in your searching. Advantages include translation from English to test cases to prove test scenarios in terms of goals. This allows you, your testers and even your product owner to easily correlate the tests with your requirements:
See easyB
SpringBeans in easyB
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Our team is doing reverse-engineering on a application with virtually non-existant documentation. We want to detect if there's a use of architectural or design patterns. You may understand that this application is large, so looking manually is no sense for us.
This application is written in Java and we use Eclipse for IDE, so it may be a plugin for Eclipse.
We have found some tools, like "Design Patterns detections Similarity Scoring", but it's not working very well.
So, such tools do exists?
If you have the source code of the app, you are most probably reengineering it, rather than reverse engineering. (The latter means recovering some sort of higher level code from machine- or bytecode).
At any rate, you want to understand the application, i.e. build a mental model of it in your mind. I am afraid automatic tools aren't of much help in this. What use would it be for you to get a list of supposed patterns in the code? Would it help you understand better what the code actually does and why? Especially taking into account the high chances of patterns being misused in legacy code :-(
In the end, you need to get down to reading the code anyway. But here is another similar thread which hopefully helps in the daunting task of taking over a legacy app.
I do not believe these kind of tools exist, because that would be pretty complex. Another approach could be to generate something like an UML diagram. This should give an abstraction of the code which could help you identify the design pattern.
I doubt there are tools out there for detecting patterns or designs in code
Code Bubbles could drastically help the reverse engineering effort, when it eventually comes out !
Lately, am finding it extremely useful to use code coverage tools to identify which parts of the code are called when a particular user/system action is initiated. It's not what the tools were designed for but am increasingly finding it more effective than other approaches. (Can post a link to details here if there is demand for it)
The next best approach is using a tool such as MaintainJ to trace code execution. This link documents that approach (when the author talks about aspects) and various other approaches, and having tried them all, coverage is what I've settled for.
Have you tried running javadoc on the code base? That would give you some idea if the structure (or lack of it) of the code. If you are really lucky design patterns might be mentioned in the comments.
There are lots of other tools for discovering class hierarchy - ClassCycle, Macker, JDepend etc.
Automatic detection of design patterns would be quite difficult I think, because a design pattern carries a lot of scope for variation.