Manager informed client that the software was tested even if it wasn’t, then manager asked the team to create a fake test document and send this document to client as some sort of proof. I think that the manager roped the entire team to something illegal?
Lying is not in and of itself illegal. Even lying in writing.
Some kinds of lying constitute the crime of fraud. Others might be part of a breach of contract that could lead to a civil judgement against your employer. To know if this lie might be either of those, you would need to know the specifics of the contract between your company and your client, and my guess is you do not. Then you would need to pay a lawyer for an opinion, and I don't think that's a good use of your money. If you are in a profession (such as engineering) that is subject to licensing, and you falsify work product, you may lose your license or (depending on your country) face further punishments from the legal system.
If you have concerns with this other than it being illegal, your options are limited. For your manager to tell people to make fake test results means that either
- he is completely desperate and sees no way to get paid for this contract other than pretending to have tested and hoping there are no huge bugs that testing would have found
- he doesn't care and can't be bothered
In neither case are you going to change his mind by objecting to lying and wondering if it is illegal. You can quit, you can plan to quit and immediately start looking for a job, you can refuse to be part of it, which might get you fired, but the fakery will probably still happen even if you do those things. You can complain to your manager's manager, but that's a gamble: if your manager was told to do it by his own manager, going to that person and complaining isn't going to get you anywhere.
There's a small chance that if you all refuse to be part of it and the manager can't do it himself, it won't get done, and then the consequence of it not being done will happen. My guess is the consequence is a significant financial hit to your employer and perhaps layoffs as a result. But who knows? Maybe your manager was just trying to show off and be seen as delivering super early and super high quality software, and if nobody participates in the ruse, testing will happen as scheduled and there will be no company consequence.
In case this sounds like I am suggesting you go along with it, let me add that this ruse is highly unlikely to work. Once the client starts testing the code they are likely to find problems, and those consequences will show right back up as a result. It's possible your manager is buying time for himself (and you) to find new jobs somewhere else. Looking might not be a bad idea.