Run test cases in multiple environments for desktop application
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Run test cases in multiple environments for desktop application
Is it possible to iterate by number of items in tested apps or to set iteration count of parent case from script? Is there any other way to iterate with different environments?
Please help me as i am stuck here.
Solved! Go to Solution.
- Labels:
-
Data-Driven Testing
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One possible way is the following.
1 - Make a file with the list of the environment path
2 - Load this file
function loadData() {
// Read your file, even a single text file if you want and put the
// list of path in an array ListOfPath
}
3 - Make a function which call all tests cases and which llop with them with the value of environment path that you iterate
function doTests() {
for (let i=0;i<ListOfPath.length;i++) {
currentPath = ListOfPath[i];
myTestNumberOne();
myTestNumberTwo();
// and so on...
}
}
If the pathes are fixed for a while, use a table in the Store of TC instead of an external file.
External file is good if you often change.
Un sourire et ça repart
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The second solution is to:
1) Run Your project with cmd and pass a variable with 'testedApp name'
2) Read cmd variables inside Your's scripts using TestComplete BuiltIn object
3) Pass these values into Project variables
4) Compare these values with the object inside Your unit file:
var obj = {
'trunk' : {
'testedAppName': 'pathToApp'
}
}
5) set this app in TestedApps.positionName.Path
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Alright, so use Project variables and put it inside a single test item parameter.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Since people have already given you the idea of using a data/environment file and you want to handle test items as well. You can look into jenkins for this particular task. TC has very good integration with it.
You can use choice parameter (or a number of other plugins) to select environemnt and test items to run for every indiviual run.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried by passing values from cmd prompt and use it, it worked with the approach. One issue i have is, i am going to run against 8 instances, which has different paths for opening the file. If i use devops pipeline, then should i handle it?(I am new to devops pipelines also). I have an idea of implementing a powershell script which will run one instance after other, will this work with ci-cd approach by calling the powershell script, i am sorry if this is a basic question, but as i am starting with this ci-cd approach i have so many question?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Saira16,
What I've understood so far is that you want to run your test case on 8 different settings one after another. If thats the case you can add multiple build step for test complete or just write a groovy script to iterate through your settings. You can also use the power shell approach by adding multiple power shells.
All of this depends on what CI-CD tool you're using. So share that and I am sure someone here will be able to help you.
Thanks
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your response. I will be using azure devops for both version control as well as pipelines.
