In the first half of the Act III, Scene 2, Bassanio shows up to choose one of the three caskets. The only way to marry Portia is to choose the correct casket between the options of gold, silver, and lead. Bassanio chooses the lead casket, which turns out to be the correct one.
In this first part of the scene, we see Portia's romanticism. It is obvious she and Bassanio are very much in love. Portia even urges him to delay choosing for a month or two so she can enjoy his company in case he chooses incorrectly. Bassanio is in great suspense ("on the rack") until he knows whether he can marry Portia, so he insists on selecting a casket shortly after his arrival.
In lines 10 -19, Portia is talking to Bassanio, but really thinking out loud, about her dilemma. She could give him a hint about which casket to choose, but then she would be "forsworn" (breaking her word). She refuses to do that, but she fears that, if Bassanio chooses wrong, she will "wish a sin — / That I had been forsworn." She is torn between keeping her word and winning the man she loves.
Jessica is not quite as scrupulous as Portia. She is willing to betray her father, even taking some of his money, so she can run away with Lorenzo. Jessica never explicitly gave her father a promise that she would not run off and marry a Christian. Her "betrayal" is more a betrayal of Shylock's unreasonable expectations of her than it is of any real duty. Shylock is a harsh and repressive father who makes some form of rebellion a necessary part of growing up. Portia's father (who stipulated the casket test in his will) was a loving father who, though his methods might have been strange, had his daughter's best interests at heart.
Jessica certainly loves Lorenzo, but she expresses herself in a less ardent and more lighthearted way than Portia does toward Bassanio (see Act V, Scene 1).
In the second half of Act III, Scene 2, the tone changes dramatically. Lorenzo, Jessica, and Salerio show up, with a letter from Antonio saying all his ships have been wrecked, he has no way to pay his debts, and he is about to die because Shylock is demanding his pound of flesh. Jessica is able to confirm this.
Now there is a crisis, and Portia's leadership ability comes to the fore.
Portia notices Bassanio blanch as he reads the letter and realizes something is very wrong. Once she understands the situation, she urges Bassanio to go at once, taking her money worth several times Antonio's debt to Shylock, and gets Bassanio's friend out of trouble. She recognizes the urgency of the situation and will not let him stay even one night after they marry, saying,
First go with me to church and call me wife,
And then away to Venice to your friend. . .
My maid Nerissa and myself meantime
Will live as maids and widows. Come away!
Of course, the reader knows, though Bassanio does not, that Portia has a contingency plan in mind in case Shylock does not accept money as payment of his debt. Her quick action, in this scene and in later scenes, saves Antonio's life.
Jessica is never put in a position comparable to this one, but she is certainly willing to take quick and decisive action (disguising herself and running away with Lorenzo) to be with her love and get herself out of a bad situation.