Former President Donald J. Trump will testify early next month in a trial that threatens the business empire that is the foundation of his public persona and informed his run for the White House.

It stems from a lawsuit brought by New York’s attorney general, Letitia James, which accuses Mr. Trump and other defendants, including his companies and his sons, Donald Jr. and Eric, of fraudulently inflating the value of assets to obtain favorable loans and insurance deals. Monday will be the trial’s 19th day.

For the past four weeks, lawyers from the attorney general’s office have argued that Mr. Trump’s employees had arbitrarily assigned values to assets in order to arrive at the former president’s desired net worth. Mr. Trump’s attorneys have responded that the assets had no objective value and that differing valuations are standard in real estate.

Before the trial, the judge, Arthur F. Engoron, ruled that Mr. Trump and the other defendants were liable for fraud, and that the annual financial statements on which they listed their assets were filled with examples of such misconduct.

As a consequence, Justice Engoron canceled the business licenses that have enabled Mr. Trump to operate his companies in New York, a blow to the former president’s empire. An appeals court paused that part of the judge’s order, meaning that while Mr. Trump’s control of the companies may still be at risk, he does not immediately need to dissolve the legal entities he uses to manage his properties.

Justice Engoron will decide at the end of the trial whether Mr. Trump will pay a significant penalty or be subject to any other punishment. Ms. James has asked that he pay $250 million and that he and his sons be permanently barred from running a business in New York.

Mr. Trump has denied all wrongdoing.

Sixteen witnesses have testified so far. This week, the attorney general plans to call Mr. Trump’s sons and his daughter Ivanka to the witness stand. Donald Trump Jr. is expected to testify on Wednesday, Eric Trump on Thursday and Ivanka Trump on Friday.

Mr. Trump himself is expected to take the stand the following Monday, Nov. 6. A lawyer for the attorney general’s office said on Friday that it would rest its case after Mr. Trump testifies.

Mr. Trump’s attorneys will then start presenting their defense, offering their own witnesses and potentially recalling others for cross-examination. The trial is expected to conclude before Dec. 22.

Here’s what happened in the trial last week:

During the first week of trial, Justice Engoron ordered Mr. Trump not to comment on members of the judge’s staff on social media. The admonition came in response to a post by Mr. Trump showing a picture of the judge’s clerk, Allison Greenfield, with Chuck Schumer, the Senate majority leader, and mocking her as “Schumer’s girlfriend.”

Mr. Trump’s post was deleted on Oct. 3, but a copy remained on Mr. Trump’s campaign website until last week. Justice Engoron called it a “blatant violation” of his gag order and fined Mr. Trump $5,000.

On Wednesday, Mr. Trump appeared to criticize Ms. Greenfield again. Speaking to television cameras, Mr. Trump, who is a Republican, called Justice Engoron partisan, which is allowed under the gag order. Then he added: “with a person who’s very partisan sitting alongside him. Perhaps even much more partisan than he is.”

That afternoon, Justice Engoron called Mr. Trump to the witness stand to testify about the comment. Mr. Trump insisted under oath that he had been referring to his former fixer, Michael D. Cohen, who was testifying that day. But he also said that he thought Ms. Greenfield was “maybe unfair, and I think she’s very biased.”

After three minutes of questioning, Justice Engoron ruled that Mr. Trump was “not credible” and fined him $10,000. In a written order, Justice Engoron said that the subject of Mr. Trump’s statement had been “unmistakably clear.”

Mr. Trump has paid the $15,000 in fines, but is expected to appeal the gag order.

Mr. Cohen testified on Tuesday that Mr. Trump directed him to “reverse engineer” the value of the former president’s assets to reach a pre-established net worth. Mr. Cohen also testified to his own involvement in deals where the statements showcased Mr. Trump’s wealth and financial power.

By Wednesday, the former fixer had grown flustered during intense cross-examination by Mr. Trump’s legal team and admitted to having lied while under oath in the past.

At one point, under questioning by Mr. Trump’s lawyer, Clifford S. Robert, Mr. Cohen said he did not recall Mr. Trump directing him to inflate the numbers on his financial statements. After the admission, Mr. Robert asked Justice Engoron to dismiss the case. When the judge refused, Mr. Trump pushed back his chair and stormed out of the room.

Mr. Cohen later clarified that his former boss conveyed his wishes indirectly. “Donald Trump speaks like a mob boss,” Mr. Cohen said. “He tells you what he wants without telling you.”