[SalesForce] compile error in test class

@isTest
private class methodonetest {
    private static Account acc;
        private static Opportunity  Opp;
        private static Quote  Q;
        private static Product2 prd;
        private static QuoteLineItem Qli;

    @testSetup static void testData(){

        acc = new Account();
        acc.Name = 'TestAccount';
        insert acc; 

        Opp = new Opportunity(Name=acc.Name + ' Opportunity ',

                                       StageName='Prospecting',start_date__c = system.today(),end_date__c = system.today()+45,

                                       CloseDate=System.today().addMonths(3),

                                       AccountId=acc.Id);

        insert Opp;

        prd = new product2(name='unittestproduct');

        prd.Family = 'License';

        insert prd;

       Pricebook2 stdPb = [select Id,name, isactive from Pricebook2 where IsStandard = true limit 1];
       //Id t = Test.getStandardPricebookId();
        //insert stdPb;
        PricebookEntry pbe = new PricebookEntry(pricebook2id = stdPb.Id, product2id = prd.id,unitprice=1.0,isActive=true);
        insert pbe;
         q=new quote(name='myquotetest',opportunityid=opp.id,pricebook2id=stdPb.Id, status='Draft');
        insert q;
        quoteLineItem i = new quotelineitem(); 
        i.quoteid      = q.id; 
        i.pricebookentryid    = pbe.id; 
        i.quantity            = 1; 
        i.unitprice           = 1; 
              insert i; 


    }
    @istest(SeeAllData=true)
    static void testApexPageMessages(){
        Test.startTest();

         //CreateOrderFromQuote s = new CreateOrderFromQuote();    
        CreateOrderFromQuote.UpdateStatusField(q.Id);
        Test.stopTest();
    }
}

This is my test class.
I'm getting the error:

Test class containing a test setup method cannot have any methods
annotated with @isTest(​SeeAllData=​true)

I need seeattdata=true as i;m using standard pricebbok2.
can someone help me how to solve the issue?

Best Answer

According to this link

Test Setup Method Considerations

Test setup methods are supported only with the default data isolation mode for a test class. If the test class or a test method has access to organization data by using the @isTest(SeeAllData=true) annotation, test setup methods aren’t supported in this class.

So either remove the annotation of @testsetup and call your static method in the test method or try and do the test without the SeeAllData attribute