My Cart
Filters
peter samoilov 399x399 (2)

aheadWorks CTO on Introducing Automated Tests to M2 Products

We've talked a lot about shifting more attention to the quality of our code and working towards easier customization of our products.

Today we've called out our CTO to talk about what is being done in that direction and what is yet to be done in the future.

aheadWorks CTO, Peter Samoilov

PETER SAMOILOV
AHEADWORKS CHIEF TECHNICAL OFFICER
10+ Years of Development Experience


aW: So, Peter, we understand it's all about automated testing currently. Would you mind giving a quick intro?

Peter: An automated test is, basically, an additional code that checks the validity of the software or a part of the software. There are multiple benefits to having it, some of which include higher product quality, lower costs of consecutive version development, testing software in a specific environment, easier code refactoring, etc.
Automated tests provide higher product quality, lower costs of consecutive version development, testing software in a specific environment, easier code refactoring, etc.

aW: Why do M2 modules require automated testing?

Peter: Tech-wise, M2 is much more complicated than M1, and that goes for modules as well. This means that writing code requires a much more thorough approach. On top of that M2 is a young platform and there is not much expertise out there and virtually no experienced specialists. Put all of this together and you get a pretty high risk of screwing something up, starting from algorithms and ending with architecture. Automated tests help to mitigate that risk.

Also, unlike with M1, with M2 we get a testing framework out of the box, which is another hint to all module vendors.

aW: What are your expectations from automated test implementation?

Peter: First, we simply want to take our extensions to the level above what we had at M1. Our intention is to have high quality products, closer to what you get at “enterprise” level.



Second, we want to establish stronger credibility with developers who use our extensions to build online stores. They want to be certain that aheadWorks extensions will work the way they are meant to in each given store, regardless of specific store settings, applied customizations, and integration of extensions of other providers. I’d even say that this is our primary goal - to guarantee our clients a reliable product.
We want to establish stronger credibility with developers who use our extensions.

aW: How demanding is testing in terms of resources?

Peter: Whatever you plan, 50% of your development time is guaranteed to go to testing, but it’s worth it.

aW: Which M2 extensions come with tests?

Peter: Our early M2 extensions do not come with tests since the process was a bit hectic at the beginning. We are working to supply tests for these extensions some time soon. All the future extensions, however, will come with tests. Right now we are launching RMA extension, which was greatly improved with the use of testing.

aW: What kind of tests will be supplied?

Peter: The kind that is aimed at integrating our extensions into a particular Magento installation. We believe that it will help our clients to check whether the extension works properly in a specific project and in a specific environment.

We have also experimented with unit tests, that could be immensely useful for a developer, but are not in high demand among integrators.
We have also experimented with unit tests, that could be immensely useful for a developer.

aW: What else is changing in your approach, apart from testing?

Peter: First of all it’s Git/HG flow. This approach has been tried and tested by our team in other projects and it proved very useful. Apart from the general neatness of the repository state, you have an opportunity to cherry pick a patch that will solve any particular problem for your client. As a side effect, our code review, which we are actively using, gets somewhat easier.

We have been using continuous delivery for quite some time, but with this flow it becomes even more effective. You get to see a status for each changeset delivery by specific branch, which is quite convenient.

aW: What else do you have planned for the future?

Peter: One of the things we wanna do is equip our clients with online technical documentation. Something like readthedocs.org, with search, code highlighting, API reference and so forth. I’m certain this will not only help our clients, but will be of benefit to our own team.
We want to equip our clients with online technical documentation.

aW: Thank you very much, Peter, for your time and detailed answers. We look forward to new Magento 2 products from your team and ask you to keep us and our readers up to date on the innovations to be implemented under your guidance. Good luck and hope to see you soon!