How early to take a pregnancy test

A
I am due to get my period according to this app on sept 6 . I haven't felt very good the last few days and have had major cramping the last three days . When is the right time to test ???