JMP generally makes it very easy to do this kind of thing, though (if you want to use a script) the details will depend on which test you want to use (more specifically, on the structure of the report that the platform generates). The script below is a simple example:
NamesDefaultToHere(1);
// Sample Data
dt1 = Open("$SAMPLE_DATA/Big Class.jmp");
// One way ANOVA with a 'By' group
ow = dt1 << Oneway( Y( :height ), X( :age ), Means( 1 ), Mean Diamonds( 1 ), By( :sex ));
// Find the table you want in the report, do a right-click and select 'Make Combined Data Table'
dt2 = Report(ow[1])[TableBox(2)] << makeCombinedDataTable;
dt2 << setName("Oneway ANOVA Results");
But just because something is easy does not make it good practice. If you are doing lots of statistical tests, I strongly recommend that you read about Response Screening.