Skip to the content.

Basic Information

info of files

sample test

Code and explaination

Code snippet


// This will check Fan participant
ParticipantInfoCollection.Instance.FindFirstMatchingParticipant("TFN");

// Ignore test
Assert.Ignore("Ignoring test. No fans detected.");


// check tab
bool SelectOpenTab() => DptfWrapper.WebModeless.SelectOpenTab(tabName);
bool SelectGroupTab() => DptfWrapper.WebModeless.SelectGroupTab(tabGroup);
bool SelectModuleTab() => DptfWrapper.WebModeless.SelectModuleTab(tabName);

// switch monitor and designer
DptfWrapper.WebModeless.SwitchModesFast(mode == "Monitor" ? WebPageInterface.UiMode.Monitor : WebPageInterface.UiMode.Designer);

DWF.WaitForResult(
				SelectModuleTab,
				isTabClosed,
				TimeSpan.FromSeconds(10),
				DWFOptions.Designer);


//LINQ Example
// Specify the data source.
        int[] scores = new int[] { 97, 92, 81, 60 };

        // Define the query expression.
        IEnumerable<int> scoreQuery =
            from score in scores
            where score > 80
            select score;

        // Execute the query.
        foreach (int i in scoreQuery)
        {
            Console.Write(i + " ");
        }            
// another LINQ
string[] words = { "bot", "apple", "apricot" };
int minimalLength = words
  .Where(w => w.StartsWith("a"))
  .Min(w => w.Length);
Console.WriteLine(minimalLength);   // output: 5



string op = EsifCommandManager.Instance.SendEsifCommand(cmd)

lambda

The lambda operator => separates the input variables on the left side from the lambda body on the right side.

This example shows nameless lamda function which return a string “hello world”

//no parameter
Func<string> greet = () => "Hello, World!";
//one parameter
Func<int, int> square = x => x * x;
Console.WriteLine(square(5)); //25
//two parameter
Func<int, int, int> square = (x,y) => x * y;
Console.WriteLine(square(5,6)); //30
// last one is return
Func<int, string, bool> isTooLong = (int x, string s) => s.Length > x;

Reference about lamda delegate and events

Muted test

preparing sut

preparing for automated test.

Testing

Muted Test

for triage debug

Story to verify

Defect = bug but not HSD Issue = Might be expected.

Coverage created -> test case created. if 1 scenerio is blocked but if failed is failed then it can be pass if 75% is passed.

Coverage updated is needed -> when any similar test case found and update anything.

ET -Exploratory Test.

Template of story verification.

Test Plan Item (n): Setup: [IN PROGRESS]Outcome:

push

Cloning a Automation Story
- for clone -> more -> clone ++ (everything)

step 1 is create a story if it is not there.

Get Automation Code
- pull master to get all the last change. 
- pull will only get unconflictedchanges. 
- create a branch and pull as needed 
- rightclick -> tortoise git -> create branch. 
- switch to new branch. 



Gherkin update
- update @tc number 
- update description 
- scenario: jama testcase id: DPTF-PSPVTC: description 
- make sure the binding is happening properly. 
- **Given** will assert data and skip if not met. 
- **assert.ignore** will ignore the test. 
- **assert.success** -> pass
- **assert.fail** -> faile


Build the package
- push the code with same remote branch. 
- goto jenkin automation pipeline. 
- build with parameter
	- dptf version 
	- branch 
- jenkin will build the artifacts with some install. 
- artifacts will be available in windows pipeline. 
- [teamcity will get those artifacts.](https://ubit-teamcity-hf.intel.com/project.html?projectId=DptfEsif_WindowsBuilds_Main_AutomationIntegrationRunners&tab=projectOverview)  
- Nightly -> specflow. 
- click next to run -> tooltip = run custom builds 
	- Dependencies -> select build
	- Parameter -> define test case 
		- nunitcategories exclude -> delete all
		- nunitcategoriesinclude by config -> 2343 (test number ) use comma for multi test. 


tips
- my settings and tools
	- General 
	- check the check box add builds triggered by me to favourites. 

Issue about remote Powershell.

Merge request

tag push / push_review

team city configuration.

Registered on server with id 1582 and authorization token ‘54093d6633e07822b56a8c5e1244b195’ created a virtual machine for running using teamcity. config file is in c:\buildagent\conf\buildAgent.properties

bring up platform to teamcity.

adding VM as teamCity agent to run test.

Add participant for automation.

The process is something like this:

  1. Create a valid dynamic participant using the appropriate manual process (which is usually the DPW).
  2. Run “participant " in ESIF. The output should contain the participant's description, hid and ptype.
  3. If the participant you created only appears in “parts”, then its enum is “CONJURE”. If the participant you created also appears in “partsk”, then its enum is “ACPI”.