Trying to progress test automation in the team. The development team have started trunk based development. They are worried the new automated smoke tests will fail all the time (due to their feature development often being incomplete) and our Jenkins board with always be RED (making it pointless). Has any one come across this issue or a fix for it? Many thanks.
You can apply the principle of feature toggles to your test codebase, so that certain tests don't run until a feature is toggled on. The principle is simple enough that you could roll your own implementation, or depending on the language you use, there are frameworks that manage feature toggles, including in your test code. Togglz is one such example for java.
Related
This is not a programming question, but I don't know any more active forum and besides programmers are the best people to be able to answer my question.
I am trying to understand the rationale behind continuous integration. On one hand, I understand that it is a good practice to daily commit your code before heading to home whether or not the coding and testing is complete or not and then there is continuous integration concept where the minute something is committed, it triggers a build and all the test cases are run. Aren't the two things contradictory?. If we commit daily whatever coding is done, it will cause daily failed builds..Why don't we manually trigger builds once the coding and testing is complete?.
Usually when you save your code daily is to be sure that your work will not be lost.
On the counterpart the CI or Continuous Integration is to test if what you produced is ok, in the majority of projects the CI isn't applied to individual branches ie: feature, bugfix, it's applied on major branches ie: master, develop, releases, etc. And these branches aren't updated daily as they need a pull request to be update and someone to approval that pull request.
The use case for having CI implemented on individual branches (feature, bugfix) is to check before merging a pull request into a major branch when it will check the tests and if the code builds.
So resuming, yes you need to commit your code daily, but you don't need to apply CI to it daily.
I suggest to you check the Gitflow workflow: https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow
The answer is obvious.
1. Committing Code: In general the code is committed only after testing with the environment locally.
Consider Developer_A working on Component_A hence one has to commit with minimum verification as the scope is to develop Component_A.
No imagine complex system with 50 developer developing Component_B...Component_Z++
If someone is committing the code without minimum test it is most probably going to give you failed result.
Or else developer might have it committed on development branch that all together depends on SCM strategy adapted in project.
2. Continues Integration test scope:
On the other hand integrator principally collects and synergies different codes (Software Components) together into 1 container and perform different tests.
Most importantly, integrator need to ensure that all the Components Developed from different developers is fitting good and at the end Software is working as expected. To ensure that, Integrator have acceptance criteria and to proactively prevent something which can go wrong, it is important to have these criteria automated with the help of Continues integration.
But among all factors, it is important to give feedback on the quality of software to the developers. It is best in favor of project (economically), to know about the bug earlier hence Continues Integration and DevOps.
In Complex System it is worth to have automated watcher to catch the sneaked mistakes from developers.
3 Tools and Automation:
To create human independent system, automation tools like Jenkins are helpful.
Based on the testing strategy different testing levels can be performed with the help of Automation tools.
I am currently working for the Test Team of my company and one of the managers gave me the task, to reduce manual regression tests based on code coverage. Now, before anyone mentions, that manual tests should be chosen depending on Use Cases and Requirements, please consider, that this task was not mine to choose, but instead a task i have to solve.
The tested application is deployed obfuscated via click once deployment and since this makes it seem alsmost impossible for any application to get coverage out of a test run, i would also love an explanation how the impact anylsis works directly.
Also a short explanation on how to set up Test Impact Analysis für TFS 2017 would be really appreciated, since the Microsoft Documentation doesn't really explain TIA for manual testing properly.
Manual Desktop Application Tests is not in the supported scenarios with the TIA. See Impact Analysis supported scenarios for detials.
Refer to Speed up testing by using Test Impact Analysis (TIA) to know how the TIA works and how to set up Test Impact Analysis.
Related link : TIA overview and VSTS integration
Our company (internal projects) used version control (TFS, now 2015) for simply keeping an audit trail of released code - I have brought in the use of branching and merging and its completely changed the way we look at bottlenecks in the development pipeline and has generally been well received, but now I am looking for the next step.
Our code consists of one large piece of software and several other accompanying business applications.
We have four environments we keep up at all times, and our 'pipeline' is like so.
Developer does work locally.
Pushes code to a 'Development' environment (so we can all look at the code, see how well it integrates in the environment e.t.c)
When testing is ready we push to 'Test' - this is code that has been approved to be moved up the pipeline and therefore the
environment is a lot more stable than 'Development'.
Next, we pass it to the UAT server, which is essentially a mimic of the live server, to be as stable and representative of a live release
as possible. Code approved to move here is NOT frequent.
Finally, production environments.
Now I simply took the approach of having a branch for each environment, allowing for easy compares, for people to quickly grab the source and whatnot, and to see the progression of the codebase up the chain.
MAIN -> STAGE -> TEST -> DEV
This is one single, linear line, and we can simply view the history of the MAIN branch to see all the different released builds.
From the dev branch we splinter off into our local branches, and any hotfixes come directly off the UAT branch.
This works for us - but it works in the sense a procedural program could work - it may not be the most effective approach.
I'm just very curious as to whether there are better ways to do this, and after reading loads of stuff online I feel like people don't split their branches by environment but I don't really understand how that works better? Even though it is a pain to merge four times to release some code (although most of the time it is a rather slow pipeline, we have weekly releases).
Any help much appreciated.
You are correct when mentioned that the more complex the branching strategy the more overhead to maintain.
But if the situation demands there are not escaping. If you have not gone through the branching strategy document by ALM rangers for TFS, please take a look. It should help you.
I think the strategy you are following is not an linear branching but rather the one in the below image.
In a more complex enterprise software the branching strategy boils down to this.
I think it's a lot of overhead to maintain different branches for each environment as you rightly mentioned above (especially the number of merges). The simplest branching strategy is the one shown below (similar to what we use):
Main
| |
| |
DEV Release
The development would happen in the DEV branch, once it is ready for UAT we merge it into MAIN and then create a Release branch. You can use the DEV branch for the next release development at this point and all the bug fixes for the current release will happen in the release branch now. The Release branch will be used for the PROD deployment as well.
As for whether this would work for you or not will depend on your specific needs but 80% of the projects I worked with uses the above branching strategy.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
What is the best set of practices and tools that could support me in the continuous deployment of an web application?
We should be able to deploy effortless several times a day.
It is a Ruby on Rails 3 app. We use Git and Github.
What is the best set of practices
I am assuming you are trying to be agile here. You trying to derive a set of best practices for deployment is a little scary. For that matter, any sort of list of best practices for an Agile Team is scary. If you carefully study Agile, you will realize that it requires the Team to inspect and adapt and continuously improve, the moment you think that your Team has found the "best practices", you by default agree that you can stop improving and hence stop inspecting, adapting, and improving. Mike Cohn, author Agile Estimating and Planning, suggests that an agile team should not come up with a set of Best practices, instead it should continuously improve, by inspecting and adapting.
To give you some constructive feedback, here are some of the practices our Scrum Team followed, which we ourselves figured out by inspecting and adapting our own deployment process. I will add information about our source code checking in practices along with deployment as well.
Every time a developer checked in code, Hudson-ci used scm poll trigger and automatically built and deployed code to a development enviroment. It sent appropriate notifications of success or failure via email.
There was a nightly build in the development environment which was triggered by Hudson-ci automatically every night.
After the features were ready and preliminarily tested in Dev environment, the QA on the team triggered a Hudson-ci build and deploy to the integration server, where the features could be integration tested. The Integration environment was an exact replica of the Production environment.
Production deployment were usually done using Hudson again based on the release plan.
and tools that could support me in the continuous deployment of an web application?
There are several CI tools out there. My favorite out of the lot is Hudson-ci. Others are Continuum and Cruise control. But I think Hudson is the most versatile and easy to use tool, and because it has community driven plugins it will be very easy for you to find a plugin for git, and ruby on rails apps to fit in.
IMVU is the poster child for continuous deployment and they got their by following the rule of "if we are sure we didn't break anything we need to deploy immediately." They now have very impressive automation around their process, but it started with that rule.
I think some of the ingredients that help with continuous deployment include:
always have a working build. this means continuous integration running automated unit tests on commit, and responding immediately to any failures. at IMVU they go as far as automatically reverting commits that break the build
extensive functional tests. this is what gives you confidence that you haven't broken anything. these tests tend to be slow so you'll need a strategy to keep the test time down, such as running tests in parallel across many machines or using a service like SauceLabs.
automated deployments. never deploy manually. never change configuration manually. deploy to all environments using the same technology.
When you say continuous deployment most people think of going automatically out to production without human intervention. You can stop short of that -- push-button production deployments -- and still get a lot of value. We (urbancode, makers of AnthillPro) help a lot of customers put these kinds of elements in place. Few people do the automatic production deploy, but automated deployment is helpful for everyone.
Jtf
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I am quite new to Lean/Kanban, but have poured over online resources over the last few weeks and have come up with a question that I haven't found a good answer for. Lean/Kanban seems otherwise such a good fit for our company, who is already using Scrum, but have reached some limitations inside that methodology. I hope someone here can give me a good idea.
As I see it, one of the biggest advantages of Scrum over Waterfall is the use of sprints. By having everything ready every 14 days you get short feedback cycles and can release often. However, as I have understood from reading about Lean, there are some costs associated with this (for example, time spent in sprint planning meetings, team commitment meetings & some problems with finding something useful for everyone at the end of the sprints).
Lean/Kanban will remove these wastes, but only at the cost of not being able to release every 14 days. Or have I missed an important point? For, in Kanban, how can you work on new development tasks and release at the same time? How do you make sure you don't ship something that is only halfway done? And how can you test it properly?
My best "solutions/ideas" so far are:
Don't release often and allow the waste associated with running out of new development tasks. Not really a solution to the question asked though.
Develop in branches and then merge into the main trunk. Makes you have to support at least two branches continuously internally.
Use some smart automatic labelling system to automatically build only certain finished tasks and not others.
As a summary, my question is: When you use Lean/Kanban, can you release often without introducing waste? Or is release often not part of Lean/Kanban?
Additional info specific to my company:
We use Team Foundation System & Source Control and have previously had some bad experiences in regards to branching and merging. Could this be solved simply by bringing in some expertise in this area?
The problem you describe seems more a source control program -- how to separate done features from features in-progress, than about Kanban. You seem to put a heavy penalty on running many branches -- which is the case for source control systems not based around the idea of multiple branches. On Distributed Source Control systems, such as GIT and Mercury, everything is a branch, and having them and working with them is lightweight.
I assume you read this blog about Kanban vs SCRUM, and the associated practical guide?
And, in answer to your question, yes, you can release often with Kanban.
You need to understand pull systems, which is what Kanban is designed to manage.
A customer (or product owner or similar) request for a feature in the running system is what triggers the process.
The request is a signal that goes to deployment. Deployment look for a tested item with properties that match the request. If none is there, you write the tests and look at development if there is a development slot that can be used to implement something that fulfils the test. When development has done its development (maybe looking for a suitable analysis first and so on), the test does its test, and deployment deploys.
The requests going backwards through the system are permissions to start working. As soon as the request has arrived, this triggers a lot of activity, where each activity should be completed as quickly as possible. There you have your turbo deployment.
Just like the request for a car goes to the dealer who looks in the ship who signals to the car factory, who signals to the suppliers.
Kanban is not about pushing requests through a system. It is about pulling functionality out of the system in exchange for a request that enters via the last step.
The team I manage uses Kanban and we release around every two weeks. If you're strict about what gets integrated into your mainline code branch (tests passing, customer approved, etc.), Kanban allows you to release whenever you want. You need to make sure that the stories moving through your system aren't co-dependent in order to do this, but on my team that's usually not a problem - a large part of our work involves maintenance, which consists of several unrelated bug fixes / features per release.
The way we handled weekly releases on a sustained engineering project that used Kanban was to implement a branching strategy. The devs worked in a sandbox branch, and made one checkin per work item. Our testers would test the work item in the sandbox; if it passed the regression tests the checkin would be migrated to our release branch. We locked the release branch from noon Monday until the release went out (usually by Wednesday, occasionally by Thursday, the drop dead date was Friday), and re-ran the regression tests for all migrated checkins as well as integration tests for the product, dropping a release once all of the tests passed.
This strategy let devs continually be working on issues without being frozen out of their branch during the release process. It also let them work on issues that took more than a week to resolve; if it wasn't checked in and tested/approved it didn't get migrated.
If I were running Kanban for a new version of a project, I'd use a similar strategy but group all related checkins as a 'feature', migrating a feature en masse to the release branch once the feature was done and then performing additional unit/integration/acceptance/regression testing in the release branch before dropping a release with that feature. Note that a key concept of Kanban is limiting work in progress, so I might restrict my team to work on one feature at a time (this would probably be several work items/user stories).
There's more to this than just source control, but your choice of TFS is going to limit you. When the Burton project was conceived back in 2004, Microsoft wasn't paying attention to Agile, much less Lean. It's going to be your weakest mechanical link for some time. Your hackles should have been raised by CodePlex's own adoption of Mercurial after having been offered to the Microsoft community as the poster child of TFS implementation.
A more salient issue here is Work Design. It encompasses the order that you choose to implement features (work schedule), as well as prioritization and cost of delay, and the shape and size of work items.
Scrum is commonly interpreted to say that non-technical "Product Owners" can determine work schedule based solely on their own concerns. If you follow this path, you're going to incur a lot waste by not taking the opportunities to do work together that belongs together. Work that belongs together can't just be determined by Product Owner wishes. Technical and workforce (skills) opportunities must also be taken into consideration.
For work to be done in the most productive way, the work itself has to be designed that way. This means that in a Lan Product Development team, decisions are made not by a non-technical worker, but by what Toyota calls someone of "Towering Technical Competence" who is close to the product, close to the customers, and close to the team.
This role is a stark contrast to Scrum's proposition. A Chief Engineer on a Lean team is himself (or herself) the voice of the customer, and the role of Product Owner is unnecessary.
Scrum's "Product Owner" is a recognition of an under-developed role in software development organizations, but it's far from a sustainable solution that consistently avoids waste. The role of "Software Architect" is often insufficient as well, as in some developer sub-cultures, the architect has become far too removed from the work.
Your issues of continuous deployment are only partially addressed with technology and tools. Look also to organizational issues, and perhaps give some thought to Scrum's purpose as a transitional approach from waterfall rather than one that can serve your organization indefinitely.
For source control I'd highly recommend Perforce. It makes branching and integrating changes from other branches relatively straightforward, and provides the best interface for source control that I've seen so far.
Continuous integration helps as well - i.e. lots of small, more than daily commits, instead of huge and potentially challenging merges. Tools like CruiseControl can help highlight when the source gets broken by a bad commit. Also, if everyone makes many small changes then conflicting changes will be rare.
I'd also advice not to try to follow things like lean, scrum, kanban & co. too closely. Just solve the problems yourself, looking to these ideas for guidance rather than instruction. The specifics of your problems will more than likely require some flexibility for the best management.
How we do it:
We have a pipeline with the following stages
Backlog
TODO
In progress (Develop and quick testing)
Code review
Test (Rigorous testing)
Integration test and general acceptance tests
Deploy
Each story is developed as a branch based on the latest version to leave the Deploy stage. They are then integrated as part of preparing the integration test.
QA pulls from the code review stage and can prepare releases at any pace the want. I think we have a pace of roughly one release every week.
By removing the "master" branch from git and not doing any merge before the code review stage we've made sure that there is no possibility to "sneak" code into releases. Which, as an interesting by-product, has forced us to visualize a lot of the work that used to be hidden.