I have joined a team in company and this team owns few services, which are used widely by many other user facing internal/external UI apps and other internal apis.
My manager gave me rough idea that these services are responsible for, let's assume, around $1B worth of traffic, or something like, so idea was, it's super critical.
There are tons of business logic, lots of if/else in c# code. Also sql Stored procedures and sql function are used. I have worked in these kind of code in past also, so I know these services are complicated too.
System mainly in maintenance mode, so no frequent code changes.
There are no unit tests and very minimum documentation.
There is an effort going on to rewrite these services side by side, without modifying this existing, and some migration plan. My manager want me to understand business.
Need for frequent releases, data issues in this monolithic in various environment, old infrastructure and high maintenance causing money, are few reasons. There is an initiative for cloud Native microservices in my organization.
In past, for these kind of scenario, I wrote integration test first. But this time I am trying to write this in BDD style, not sure if this going to be a right approach. I never worked with BDD, but read about it. Seems output of BDD is good documentation, with other benefits. Nevertheless my ultimate aim to document business logics so that we can use it while rewriting this application. Refactoring seems not an option here.
Suggest me if I am going in right direction, any other points I should take care of, on effective documentation of business logics.