Test rig in TDD (test driven development) - tdd

My company want to apply TDD in our projects and we began to study TDD 5 months ago. We start from writing unit to acceptace tests ( you can see in http://uet.vnu.edu.vn/~chauttm/TDD/). Then we follow this book "growing_object-oriented_software_guided_by_tests" to do a pilot project.
But we have a problem with test rig( architecture to test end to end system)
https://docs.google.com/file/d/0B23s8xkJtB5ZNHBJbEZ3YTdMTWc/edit.
We have 3 teams, a team develops service side, a team develops Android client and a team develops iOS client. Following above test rig, client teams will write acceptance tests and insert directly data into database. The service team will create an sql file then client teams will use this file to insert into database. The client teams do not know about all database ( Our system has more than 200 tables) and sometimes, they have to spend a lot of time to debug because they do not know the service errors.
Can you give me another test rig or suggest me the ways to make our projects ( in TDD) more effective ?

The client teams should have a mock service layer that they write automated tests against. These will have the advantage of running quickly and not requiring coordination with the service team. Most of the acceptance tests for the client application should be written this way. If you were writing an app that uses the Google calendar API, you wouldn't try to recreate the entire calendar API, you'd just mock out the calendar API the way you expect it to work.
For integration tests between the teams you can have a version of the production service on a separate server with a copy of the production database with some test data in it. For testing, configure the clients to use the test endpoint instead of production.

Related

Azure Load Testing External Request (API call) Performance / load testing with Individual Call performance details

I want to perform load testing of Single Page Application. So i have created JMeter script for that and it is working fine from my single machine for concurrent users. But i want to create actual concurrent users scenario from different machine or location. For that reason i am trying to use Azure Load Testing service and there want to use JMeter script which i have created on my local machine.
Please let me know if Azure Load testing service support below points : -
Is it possible to test performance of API call which are going to other servers (non Azure).
Is it possible to track performance report like JMeter for each API call individually.
Please let me know if any clue on above problems.
Thanks
As per documentation
Enable developers and testers to generate high-scale load and run simulations that reveal actionable insights into app performance, scalability, and capacity with a fully managed load-testing service. Create tests quickly without prior knowledge of load testing tools, or upload your existing Apache JMeter scripts. Gain specialized recommendations backed by comprehensive metrics and analytics, and support continuous improvement through automated continuous integration and continuous delivery (CI/CD) workflows—all with a testing service built for Azure.
So it should be possible to run your JMeter scripts from Azure. If your system under test is reachable from the Internet you it doesn't matter where it's deployed.
If not and your application is only accessible from your local Intranet - you will have to go for JMeter Distributed Testing

Elsa Workflows for the enterprise

I about to embark on a new project in my company. I work in an enterprise that is highly governed by standards and best practices. We have Kofax TotalAgility already deployed. I'm trying to use Elsa as a lightweight alternative to Kofax which is built on .Net 4.6. I'm on Blazor Server-Side and .Net 5.
So Elsa has an appeal. Secondly, there s a severe lack of help when it comes to Elsa. A generic or hobbyist developer will not use a Workflow based business layer. Workflows are more common in enterprise environments. We have a load balanced deployment model for apps with AlwaysOn SQL Servers. If I include Elsa embedded in an application having it's tables as a part of the apps DB, I need to deploy it to two nodes pointing to same DB. This creates race conditions when it comes to pick up activities saved in DB and perform action. That is why Kofax is deployed as a single node specially. Which means I need to deploy Elsa based generic solution for all my apps. And I simply do not have a sample or a guide to do this.
Can someone help me understand this scenario: An Elsa deployed and running on a server with IIS exposing it API interface (if it has else deployed embedded in a .Net 5 Web API). A separate application(s) will be, then, leveraging this instance of Elsa.
I may be wrong in my understanding here. Please help.
Elsa 1 (the current release) is not suitable to use on more than a single node. Not only will you encounter concurrency issues as the OP mentions, but workflows with time-based activities will cause a given workflow to execute on every node, which is undesirable in normal use cases.
Elsa 2 (currently available as preview packages on MyGet) is a different story. Like Elsa 1, it is designed for use in your own application as a light-weight solution to add workflowing capabilities. But unlike Elsa 1, it is also designed to run as a separate workflow server, exposing APIs for other applications to interact with. For example, the dashboard application does not access the Elsa database directly, but instead takes advantage of the workflow server's API endpoints. Additionally, Elsa 2 is designed to be hosted on both single node and multi node environments, allowing you to easily scale out the workflow server horizontally.
Elsa 2 is slated to be released end of March.

How to Test Gol App Engine apps locally on Win 10 and use app.yaml

In Google's latest docs, they say to test Go 1.12+ apps locally, one should just go build.
However, this doesn't take into account all the routing etc that would happen in the app engine utilizing the app.yaml config file.
I see that the dev_appserver.py is still included in the sdk. But it doesn't seem to work in Windows 10.
How does one test their Go App Engine App locally with the app.yaml. ie: as an actual emulated app engine app.
Thank you!
On one hand, if your application consists of just the default service I would recommend to follow #cerise-limón comment suggestion. In general, it is recommended for the routing logic of the application to be handled within the code. Although I'm not a Go programmer, for single service applications that use static_files and static_dir there shouldn't be any problems when testing the application locally. You might also deploy the new version without promoting traffic to it in order to test it as explained here.
On the other hand, if your application is distributed across multiple services and the routing is managed through the dispatch.yaml configuration file you might follow two approaches:
Test each service locally one by one. This could be the way to go if each service has a single responsibility/functionality that could be tested in isolation from the other services. In fact, with this kind of architecture the testing procedure would be more or less the same as for single service applications.
Run all services locally at once and build your own routing layer. This option would allow to test applications where services needs to reach one another in order to fulfill the requests made to them.
Another approach that is widely used is to have a separate project for development purposes where you could just deploy the application and observe it's behavior in the App Engine environment. As for applications with highly coupled services it would be the easiest option. But it largely depends on your budget.

How to do a performance Testing with MS Botframework

We have created a bot which uses Luis to address user queries. Would like to understand how can we perform a performance testing to my bot which can be like a VSTS testing. Yes tried with VSTS also but of no use, since my bot api is always sending a request and response couldn't capture the exact one. Please help.
I'm not sure if you are using Azure bot service directly or the other way. Considering if you are using the Azure Bot Service following are the steps to configure performance test.
You can do performance test using Azure Bot Service from continuous integration tab
Select the team services account, subscription and location.
You can track the build and errors using Azure App insights
Let me know if you are looking for anything else.
Regards
-Jyo

Connect to an Oracle Database in Swift

I am using Xcode 7, Swift, and the new UI Automation announced at WWDC 15. I want to test some things in an oracle database after some of my UI automation tests have run.
Can this be done? If so how do you do it? I can't seem to find any sort of documentation on the subject.
The mobile phone doesn't guarantee a permanent and stable network connection and is a big problem for direct connection to DB.
For mobile platforms you need to create a web service on a server that will do all the work between database and mobile application. It is not recommended to connect directly to databases, except when it is local databases(SQLite).
I just upvoted #lurie-manea answer, in addition to that you shouldn't rely on Xcode UI test for testing your DB transaction once you have your web service implemented since you'd be able to test the DB state with XCTest(app tests) or if you using AppCode for writing code, it has nice plugin to test restful web services,
https://www.jetbrains.com/objc/help/testing-restful-web-services.html
Hope this helps.

Resources