So, I have this colleague (call him Mark). Both of us are software developers with more than a year’s experience (his being two months longer than mine). Since we were hired, he has been working on automating a product using Selenium, while I, after doing automation for the first four months, was given the opportunity to work in software development by my CTO. I continued there for six months and during that time, Mark, along with another guy in our team (who is in testing automation, and is three years my senior) was working on the automation of that product.
Their automation was about to get completed in six months but it couldn't because they were facing many issues. My CTO then brought me back into our automation group to start it from scratch and then complete it. We are in the final phase of of our project’s completion. The problem is that this final phase is getting stretched beyond the last three weeks.
Our CTO has pressured us to hurry up and finish all the remaining work as soon as possible. The problem is that my colleague (who is also my friend outside our professional relations) is working extremely slowly. The CTO has made me responsible for managing both of us and finishing the project quickly. But my colleague is behaving extremely negatively and says that it will take another month to complete the remaining tasks. Along with this attitude, his main problem is his own huge ego and his non-receptiveness to fast solutions, which I or our other colleague provides. I understand that he’s jealous of this, a notion which I get from our CTO. Also, when I was stabilising the test suites, I realized that 99% of the test suites had issues, was code implemented by him, and wasn't working correctly. The data he prepared had issues as well.
Realizing all this, I informed my CTO of the situation, who organised a small casual meeting and told my co-worker indirectly to be somewhat open to solutions provided by others to improve his work and to leave his ego behind while doing so. But after the meeting, Mark being Mark said to me that the CTO is stupid, so he ignored the CTO’s words. Now, he is working in the Test cricket mode in a situation which demands T20 cricket mode. I talked to him about what we all can do to support each other, but he simply said this task is impossible and is working in extremely slowly.
The CTO always comes to me to ask what the status of our plan is, and again and again I have to tell him that the work is still in progress. He’s scolded me about this many times over the past couple of days, which makes me look bad even though it isn’t my fault. Now I don't know what to do. Talking with Mark about the issue was futile, and if I were to inform the CTO that I'm not able to cooperate with Mark because of his negative and egoistic attitude, then he would definitely throw Mark out of a job, which I don't want because Mark is still my friend outside of work.