sl@0: /*
sl@0: * Copyright (c) 1998-2010 Nokia Corporation and/or its subsidiary(-ies).
sl@0: * All rights reserved.
sl@0: * This component and the accompanying materials are made available
sl@0: * under the terms of the License "Eclipse Public License v1.0"
sl@0: * which accompanies this distribution, and is available
sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0: *
sl@0: * Initial Contributors:
sl@0: * Nokia Corporation - initial contribution.
sl@0: *
sl@0: * Contributors:
sl@0: *
sl@0: * Description:
sl@0: *
sl@0: */
sl@0:
sl@0:
sl@0: #ifndef __T_SCRIPTSETUP_H__
sl@0: #define __T_SCRIPTSETUP_H__
sl@0:
sl@0: #include "t_testsetup.h"
sl@0: #include "tScriptTests.h"
sl@0:
sl@0: //test setup base classes
sl@0: _LIT8(KActionStart, "");
sl@0: _LIT8(KActionEnd, "");
sl@0: _LIT8(KActionNameStart, "");
sl@0: _LIT8(KActionNameEnd, "");
sl@0: _LIT8(KActionTypeStart, "");
sl@0: _LIT8(KActionTypeEnd, "");
sl@0: _LIT8(KActionBodyStart, "");
sl@0: _LIT8(KActionBodyEnd, "");
sl@0: _LIT8(KActionResultStart, "");
sl@0: _LIT8(KActionResultEnd, "");
sl@0: _LIT8(KActionGroupingStart, "");
sl@0: _LIT8(KActionGroupingEnd, "");
sl@0: _LIT8(KKnownDefectStart, "");
sl@0: _LIT8(KKnownDefectEnd, "");
sl@0: _LIT8(KRunTestStep, "RUN_TEST_STEP");
sl@0: _LIT8(KStartTestStep, "START_TESTCASE");
sl@0: _LIT8(KEndTestStep, "END_TESTCASE");
sl@0:
sl@0: class CTestAction;
sl@0: class TTestActionSpec;
sl@0: class CTestSetup;
sl@0: class CTestSpec;
sl@0:
sl@0:
sl@0: class CScriptSetup : public CTestSetup
sl@0: {
sl@0: public:
sl@0: IMPORT_C static CScriptSetup* NewLC(CConsoleBase* aConsole);
sl@0:
sl@0: public:
sl@0: //aTestSpec is the class that holds the array of test actions, and has the GetNextTest function
sl@0: //theTestTypes is the static array of test types
sl@0: //aCommandLineSettings contains the command line parameters
sl@0: IMPORT_C virtual void SetupTestsL(RFs& aFs, CTestSpec& aTestSpec, TScriptTests theTestTypes[],
sl@0: const CTestHandlerSettings& aCommandLineSettings);
sl@0: IMPORT_C ~CScriptSetup();
sl@0:
sl@0: IMPORT_C TBool InitialiseL(RFs &aFs, const TDesC& aDefaultScript = KNullDesC, const TDesC& aDefaultLog = KNullDesC, TBool aUseCommandLine = ETrue);
sl@0: HBufC* iScriptPath;
sl@0: protected:
sl@0: CScriptSetup(CConsoleBase* aConsole);
sl@0:
sl@0: protected:
sl@0: HBufC8* iTestInput;
sl@0: HBufC8* scriptResult;
sl@0:
sl@0: TBool iTefScript;
sl@0:
sl@0: protected:
sl@0: IMPORT_C virtual CTestAction* CreateActionL(RFs& aFs, const TTestActionSpec& aTestActionSpec,
sl@0: const TScriptTests theTestArray[]) const;
sl@0: };
sl@0:
sl@0: #endif