Which assertion library for Java has the best integration with Allure Reports? - automated-tests

I'm using Allure Reports to provide test results on my automated tests. However, I'm noticing that assertions are not showing up as step in the reports. I would like to know which assertions library has best integration with Allure, so that when I use these assertions, they appear in the report.
I'm using JUnit5 with RestAssured for my automated tests.
If the answer is none, then would the best course of action be to create my own assertion library to add the #Step annotation?

Allure provides integrations with AssertJ and Hamcrest assertions libraries. See allure-assertj and allure-hamcrest Maven modules.

Related

How to use dotnet-coverage connect utility?

I have a DOTNET ASP.NET API REST service that needs to have integration testing with code coverage measured.
I have the code coverage for unit tests currently functioning.
The testing harness is using Postman (Newman for CLI) issuing requests to an executing instance of the API service.
I was considering using the utility dotnet-coverage connect to collect the code coverage data during testing. However, I can't find any examples of its usage.
Documentation: dotnet-coverage connect
Does any one have any experience with this approach? Any other technique I should consider?
Thanks in advance.

frobot framework - Usage outside testing

I recently learned how to use robot framework - a testing framework for software / web app testing. It has very simple strong expressive syntax.
I wonder if there is possibility of any other usage of robot framework than testing - I could imagine to create some kind of scraping bot, or checking bot. But so far it looks to me, like it is created strictly for testing (basically whole logic you write in testcases).
So my question:
Can robot framework be used outside testing? If yes, can you provide any resources / examples?
Feel free to share any personal experience with this.
Yes, robot can be used outside of testing. Robot Framework version 3.1 added preliminary support for RPA (robotic process automation). Instead of tests, you can create tasks.
See Creating tasks in the robot framework user guide for a bit more information.

Test automation for microservices architecture

I am in charge of implementing QA processes and test automation for a project using microservices architecture.
Project has one public api that makes some data available. So I will automate API tests. Tests will live in one repository. This part is clear to me, I did this before in other monolith projects. I had one repo for API tests. And possibly another repo for selenium tests.
But then here the whole poduct consists of many microservices that communicate via restful apis and/or rabbit queues. How would I go about automating tests for each of these individual servicess? Would tests for each individual service be in a separate repo? Note: services are written in Java or PHP. I will automate tests with Python. It seems to me that I will end up with a lot of repos for tests/stubs/mocks.
What suggestions or good resources can community offer? :)
Keep unit and contract tests with the microservice implementation
Component tests make sense in the context of composite microservices,
so keep them together
Have the integration and E2E tests in a
separate repo, grouped by use cases
For this kind of testing I like to use Pact. (I know you said Python, but I couldn't find anything similar in that space, so I hope you (or other people searching) will find this excellent Ruby gem useful.)
For testing from outside in, you can just use the proxy component - hope this at least gives you some ideas.
Give each microservice its own code repository, and add one for the cross-service end-to-end tests.
Inside a microservice's repository, keep everything that relates to that service, from code over tests to documentation and pipeline:
root/
app/
source-code/
unit-tests/ (also: integration-tests, component-tests)
acceptance-tests/
contract-tests/
Keep everything that your build step uses in one folder (here: app), probably with sub-folders to distinguish source code from unit tests, integration tests, and component tests.
Put tests like acceptance tests and contract tests that run in later stages of the delivery pipeline in own folders. This keeps them viually separate. It also simplifies creating separate build/test steps for them, for example by including own pom.xml's when using Maven.
If a developer changes a feature, he will need to change the tests at the exact same time to ensure the two fit together. Keeping code and tests in the same repository keeps the two in sync in a natural way.

Can I get at my application code from inside a Selenium test?

I'm writing unit and integration tests for a WordPress site, using PHPUnit and Selenium. There's a useful WP test library for PHPUnit, used by extending a special WP_UnitTestCase instead of PHPUnit_TestCase.
So far so good. What would be truly useful, though, would be if my Selenium tests could also execute code in the context of WordPress. So for example, I could build and manipulate users, posts etc while testing client-side behaviour, much in the way you can do with a Rails integration test.
Is there any way I can use the features of a WP_UnitTestCase in the context of a Selenium test?
I'm not familiar with WP_UnitTestCase but you could look at this lightweight tool I developed which creates a test WordPress instance.
https://github.com/evomase/phpunit-wordpress
You should be able to integrate it with Selenium easily as you would do with a standalone application. The only difference will be that in build.php, you will need to change the WP_SITEURL to the VirtualHost you've created for your test instance.

BizTalk, TestableReceivePipeline and FileAdapter

I want to test a pipeline which includes a custom component using properties in the message property bag, which at runtime the File Adapter creates. How do I inject those properties in a unit test ?
I think starting BizTalk Server 2009 there's already a build support for Visual Studio to generate test artifacts for BizTalk Server pipelines.
See this link http://msdn.microsoft.com/en-us/library/dd792682%28v=bts.10%29.aspx
Also here a very good blog which the author has summarized several way of testing BizTalk Server Artifacts. http://santoshbenjamin.wordpress.com/2009/02/05/biztalk-testing-and-mocks/
Personally, As mentioned by hugh above I'm also using the Tomas Restrepo's pipeline testing framework combined with Moq mocking framework, it has given me an advantage of a more stable and more fluent way of testing Biztalk applications.
Another advantage of http://winterdom.com/2007/08/pipelinetesting11released is if you're using BizUnit for your Unit or Integration testing then it is already supported.
Hope this helps
Sounds like you need to use Tomas Restrepo's pipeline testing framework:
http://winterdom.com/2007/08/pipelinetesting11released

Resources