2

In complex projects with multiple end-to-end functional test scenarios, there is a need for maintenance and execution of these test scenarios. For that purpose, I've been using Cucumber and found it to be a good way to help me keep the scenarios in a sensible and clear way. So I had the Cucumber feature files to maintain the scenarios logic and then, using the Cucumber.class with JUnit runner, I was able to actually execute these test scenarios.

Sometimes, however, I would like to avoid using Cucumber as it does require some overhead work with the feature files and glue code maintenance etc.. So I wonder what are the other approaches being used for such purpose?

I know that I can jUnit itself to some extent but as I see it, it will be very difficult to maintain test cases with multiple, mutually dependent steps.

Will be great to know what other practices are being use for the above mentioned purposes.

3 Answers 3

1

The short answer: Every test automation tool out there has some sort of test case management capability. So there's no need to list them down here.

My approach: I find it easier to list my requirements and code a solution myself instead of using a 3rd party framework. Re-inventing the wheel is generally the better solution. Yes you read me right. Each tool that you start using introduces a learning curve, their own jargon and mindset to learn, maintenance of its own that includes other stakeholders (such as purchasing), creates a dependence at many levels, etc. And programming languages and frameworks nowadays are good enough to start using your own implementation - of course this depends on your level of experience with your tools.

2
  • Thanks for your answer but especially if you are saying that you do develop your own framework, how do you manage your scenarios then?
    – Eugene S
    Commented Jun 26, 2016 at 5:31
  • Apart from keeping them in the code somewhere? I generally use another test case management tool to bundle them & link from a test plan, and for the test cases that I automate, I put a summary of the test case in the management tool - no need to duplicate the steps in both places. For my current project, I'm using MS TFS to list down test suites + cases. Is this what you're asking for management? Commented Jun 26, 2016 at 20:31
0

I would prefer to create a hybrid framework for once and all. It includes both keyword driven + data driven capabilities where you would be describing methods as business keywords and referencing them in an excel sheet along with data supposed to be tested and include TESTNG framework for grouping the test cases and created a property file where you could parameterize the tests.

Although this takes enough time in the beginning, I assure you the end result would be very productive.

0

Another approach is to go simple. I don't know if that works for your case.

You can use something like APId. It allows you to define user stories (called transactions) that are series of requests and check those. You can have dynamic variables between them. For example, can do something like authenticate, list all users, get the first user and verify that the format of the response is what you expect.

The tests are written in YAML, so that should get you going quickly (since JSON is a subset of YAML, you can go with JSON as well).

Disclaimer: I maintain APId

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.