(* We verify Stokes Theorem for the upper hemisphere with radius R centered at the origin with F(x,y,z)=(xy,x,yz) *) 
(* parametrization of surface *)
R=1
r={R Sin[ph]Cos[th],R Sin[ph]Sin[th],R Cos[ph]}
rth=D[r,th]
rph=D[r,ph]
n=Simplify[Cross[rph,rth]]

(* Flux integral *)
F={y x,x,y z}
cF=Curl[F,{x,y,z}]
cFOr=cF/.{x->r[[1]],y->r[[2]],z->r[[3]]}
Simplify[Dot[cFOr,n]]
Integrate[%,{th,0,2 Pi}]
Integrate[%,{ph,0,Pi/2}]

(* Parametrization of boundary *)
s={R Cos[t],R Sin[t],0}
st=D[s,t]

(* Line integral *)
FOs=F/.{x->s[[1]],y->s[[2]],z->s[[3]]}
Dot[FOs,st]
Integrate[%,{t,0,2 Pi}]