The deposed chief minister of the south Indian state of Andhra Pradesh, former film idol N.T. Rama Rao, today was prevented from testing his claimed majority in the state assembly when violence and arson erupted in the legislative chamber and the session was abruptly adjourned, witnesses reported.

The showdown vote of confidence, which has embroiled Prime Minister Indira Gandhi and her ruling Congress (I) Party in a major national controversy, was postponed a day after supporters of the Congress Party-backed state leader, N. Bhaskara Rao, scuffled with assemblymen backing Rama Rao and shouted down motions for a roll call.

The dispute over majority control in Andhra Pradesh has focused national attention on the issue of states rights in India and led to charges that Gandhi is engaged in a systematic campaign to topple opposition party governments to gain political advantage before elections for the national Parliament that are due to be held by January.

A backlash of sentiment for Rama Rao has had wide political implications not only in Andhra Pradesh but throughout south India where regionalism and resentment over what is viewed as dictatorial central rule run strong.

Foreign journalists and Indians representing national newspapers were barred by police roadblocks today from approaching within a half-mile of the state assembly building.

Witnesses said pandemonium erupted in the stately legislative hall as firecrackers exploded and a seat was set ablaze in what Rama Rao's supporters said was a staged riot designed to scuttle the confidence vote and keep Bhaskara Rao in power as chief minister of the state.

Hyderabad remained under curfew for the third day as tensions over the power struggle and apparently unrelated Hindu-Moslem sectarian violence continued to run high. Police reported that seven persons were killed tonight when gangs of Hindu youths clashed with Moslems in the Old City of Hyderabad. The curfew in the entire city was tightened following the disturbances, and officials said travel restrictions would remain in effect through Wednesday.

Thousands of Rama Rao supporters defied the curfew today and lined the streets as the leader of the Telugu Desam party drove from his film studio to the assembly for the vote.

Rama Rao, declaring that the future of democracy in India is at stake, said he will press Wednesday for a vote of confidence to prove he has an absolute majority in the 295-seat house and win reinstatement to the top state post he lost when summarily dismissed Aug. 16 by the Gandhi-appointed governor, Ram Lal, who since has resigned.

Following the dismissal of Rama Rao's elected government, and similar unseatings in the northern states of Jammu-Kashmir and Sikkim, the national opposition parties united in a "save democracy" campaign that has captured the imaginations of many Indians and that appears likely to dominate electoral politics for the rest of the year.

Today's assembly meeting, raucous even by the standards of freewheeling state politics in India, began to disintegrate only three minutes after Speaker M. Bhaga Reddy gaveled it to order. In a parliamentary maneuver that Rama Rao said was designed to buy time for Bhaskara Rao's faction to recruit defectors, Reddy began reading a condolance resolution for an assemblymen who died recently. Traditionally, such resolutions are followed by two minutes of silence, and then adjournment for a day as a sign of respect.

When Rama Rao supporter Srinivasulu Reddy asked for a roll call on the confidence vote, chaos broke out on the floor, members of the assembly said.

Rama Rao, who last month underwent coronary bypass surgery in Houston, Tex., looked shaken after the session and appeared near collapse as he met with reporters at his film studio.

Only an hour earlier, the screen star, who often portrayed Hindu deities in the 300 films he made before sweeping into power in January 1983, had looked robust as he prayed before an outdoor religious statue.