1. Lawyers must communicate pertinent information to a client: Model rules of professional responsibility (states may have tweaks or variations) text:
Client-Lawyer Relationship
(a) A lawyer shall:
(1) promptly inform the client of any decision or circumstance with respect to which the client's informed consent, as defined in Rule 1.0(e), is required by these Rules;
(2) reasonably consult with the client about the means by which the client's objectives are to be accomplished;
(3) keep the client reasonably informed about the status of the matter;
(4) promptly comply with reasonable requests for information; and
(5) consult with the client about any relevant limitation on the lawyer's conduct when the lawyer knows that the client expects assistance not permitted by the Rules of Professional Conduct or other law.
(b) A lawyer shall explain a matter to the extent reasonably necessary to permit the client to make informed decisions regarding the representation.
Generally, per the Comment to the rule, "The client should have sufficient information to participate intelligently in decisions concerning the objectives of the representation and the means by which they are to be pursued, to the extent the client is willing and able to do so."
2. Lawyers must give candid professional advice to clients when asked. As counselor, model rule 2.1:
Counselor
In representing a client, a lawyer shall exercise independent professional judgment and render candid advice. In rendering advice, a lawyer may refer not only to law but to other considerations such as moral, economic, social and political factors, that may be relevant to the client's situation.
Comment to 2.1 expands: "[1] A client is entitled to straightforward advice expressing the lawyer's honest assessment. Legal advice often involves unpleasant facts and alternatives that a client may be disinclined to confront. In presenting advice, a lawyer endeavors to sustain the client's morale and may put advice in as acceptable a form as honesty permits. However, a lawyer should not be deterred from giving candid advice by the prospect that the advice will be unpalatable to the client."
The comments also note that it may be necessary to provide advice that extends beyond the literal letter of the law, in order to help the client evaluate the situation in context (legal, social, moral, etc.).
3. Ultimately, it is the client's decision to go forward with a trial or to testify and if so elected a lawyer must do their best given the client's decision and how it shakes out - model rule 1.2:
Client-Lawyer Relationship
(a) Subject to paragraphs (c) and (d), a lawyer shall abide by a client's decisions concerning the objectives of representation and, as required by Rule 1.4, shall consult with the client as to the means by which they are to be pursued. A lawyer may take such action on behalf of the client as is impliedly authorized to carry out the representation. A lawyer shall abide by a client's decision whether to settle a matter. In a criminal case, the lawyer shall abide by the client's decision, after consultation with the lawyer, as to a plea to be entered, whether to waive jury trial and whether the client will testify.
4. As far as how an attorney will meet that obligation, under Rule 3.1, a lawyer has obligations to not present frivolous claims, etc., though there are separate sets of obligations to defend in criminal cases trump the rules:
[Comment to 3.1]:
"[1]The advocate has a duty to use legal procedure for the fullest benefit of the client's cause, but also a duty not to abuse legal procedure.[...]
[...]
[3] The lawyer's obligations under this Rule are subordinate to federal or state constitutional law that entitles a defendant in a criminal matter to the assistance of counsel in presenting a claim or contention that otherwise would be prohibited by this Rule."