why I get two different answers?
https://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=Paris%20Hilton&cr=countryUS&lr=lang_en&hl=en :
1- http://www.parishilton.com/
2- http://en.wikipedia.org/wiki/Paris_Hilton
3- https://twitter.com/ParisHiltonhttps://twitter.com/ParisHilton
4- http://www.tmz.com/person/paris-hilton/
5- http://perezhilton.com/category/paris-hilton
https://www.google.com/search?q=Paris+Hilton&cr=countryUS&lr=lang_en&hl=en :
1- http://en.wikipedia.org/wiki/Paris_Hilton
2- https://twitter.com/ParisHilton
3- http://www.parishilton.com/
4- http://www.tmz.com/person/paris-hilton/
5- http://perezhilton.com/category/paris-hilton
how can I get 2 the same answer?
Related
I would like to create a list of projects within a "group" using the terminal in my machine. The group is private and I'm assuming I need a personal access token to reach it.
I saw in Gitlab API I should use POST command for this: https://docs.gitlab.com/ee/api/projects.html#create-project. But I don't see how to specify the group I want to create it into. Using this question: How do you create a project in a specific group via GitLab API?, I could write the command:
curl --header "PRIVATE-TOKEN: my-personal-access token" -X POST "https://gitlab.com/api/v4/projects?name=mylaboratory%2Fgroupname%2Fproject name"
After that I'm getting:
{"message":{"name":["can contain only letters, digits, emojis, '_', '.', dash, space. It must start with letter, digit, emoji or '_'."],"path":["can contain only letters, digits, '_', '-' and '.'. Cannot start with '-', end in '.git' or end in '.atom'"]}}
Here is my example url:
https://gitlab.eth.ch/api/v4/projects?path=lasec%2Fstudent-repos-cs372-2021%2Fgroup31
Is there a way to specify these new projects should disable rewriting commit history?
Try 1
Fixed changing .com to the relevant extension.
Try 2
From another computer the error curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1) goes away, this may be related to the connection as pointed in the comments.
Try 3
The attribute you're looking for in the API is the namespace_id, and should be the ID of the group that you'd like to create the project within. If you wanted to create a nested group structure, each group you create can accept a parent_id which should be the ID of its parent.
I wanted to run Cucumber Feature file based on the Test case ID that scanerio name contains.
I know we can use #CucumberOptions 'features' tag and specify the line number to execute e.g "src/test/resources/Folder/myfile.feature:7:12"
This will run scenarios at line 7 and 12. But i wanted to run based on the TC ID.
Below is the feature file code
#Run
Feature: Login Functionality
Scenario: First Test Case(TC.No:1)
Given I perform action 1
Scenario: Second Test Case(TC.No:2)
Given I perform action 2
Scenario: Third Test Case(TC.No:3)
Given I perform action 3
Scenario: Fourth Test Case(TC.No:4)
Given I perform action 4
Scenario: Fifth Test Case(TC.No:5)
Given I perform action 5
All the scenario's are in a single feature.
For the feature file code above i wanted some way through which i can execute based on TC Id. E.g I only want to execute TC1,TC2 and TC5( TC id's picked up from scenario names).
There is a property file that contains the TC Id's to be executed. My code should read the file and then execute only those TC id's.
This can help me in reducing the number of automation TC's to be run.
Is it possible?
You can use the name property of #CucumberOptions or use the '-n' option if you are using the cli option. It also supports regular expressions.
To run TC.No:1 and TC.No:4 use something like this
#CucumberOptions(name = { "TC.No:1|TC.No:4" })
or
#CucumberOptions(name = { "TC.No:1","TC.No:4" })
You can get more details at this link.
As you are reading the ids from a file, the second option is the best. Use the cucumber.api.cli.Main class main() method to execute the features. You can create the options dynamically. Refer to this post.
CLI reference docs.
Not familiar with cucumber-jvm.
But, here is the general logic which should work (based on my ruby Cucumber knowledge)
In the hook, you can write the logic to under before method to get the scenario name scenario.name and then extract the TC.No. Compare the TC.No and skip if it's not part of your list.
Here is the link which will give information how to skip the scenario (use this class in the before method)
https://junit.org/junit4/javadoc/4.12/org/junit/AssumptionViolatedException.html
However, the best practice is to use the tags, it would have been easy if you had #TCId-xx tag. Still you can write a simple program that will scan all the feature files and update the scenarios with the tag based on the TC.No in the scenario name.
I have an extension (Quick Update) when installed it overwrite the original product editing page in Admin, and another extension to export products to csv. Im not able to combine the 2 extensions on the same template.
Im using Opencart 2.3.0.2
I want to duplicate the product page, this way Ill have the export csv on 1 page, and Quick Update on another.
Step 1
I duplicated the file admin/conteroller/catalog/product.php
Changed its name to product1.php
Changed the class name to ControllerCatalogProduct1
Changed every catalog/product to catalog/product1
Step 2
I duplicated the file admin/language/en-gb/catalog/product.php
Changed its name to product1.php
I don't know if this is a necessary step
Step 3
I duplicated the file admin/model/catalog/product.php
Changed its name to product1.php
Changed the class name to ModelCatalogProduct1
Step 4
I duplicated the file admin/view/template/catalog/product.tpl
Changed its name to product1.tpl
Changed
From
var url = 'index.php?route=catalog/product&token=<?php echo $token; ?>';
To
var url = 'index.php?route=catalog/product1&token=<?php echo $token; ?>';
Step 5
Now I added the new product template to the left column menu and gave permission to the user group.
When I open the page, it's blank. Any help ?
Thanks :)
Found it.
in this file:
admin\controller\catalog\product1.php
Find all:
model_catalog_product
Replace with:
model_catalog_product1
In my cucumber feature file, Ihave some thing like this:
Scenario Outline: Hi Hello
Given I open
When I fill details <name> <Age> <DON> <Place>
Then Click enter
Then I verify
Examples:
|Name|Age|BOB |Place|
|JOHN|20 |2000| OH |
Above Examples values are used in When step , I'm trying to verify all details in Last step "Then I verify" , where actually i'm not passing any value to that step .
Question : Do we have any way to read Examples details from Last Then method(Step)
Is there a way to read Examples Key value from Step "Then I verify"
Can't you do this:
Scenario Outline: Hi Hello
Given I open
When I fill details <name> <Age> <DON> <Place>
Then Click enter
Then I verify <name> <Age> <DON> <Place>
Examples:
|Name|Age|BOB |Place|
|JOHN|20 |2000| OH |
The whole point of using variables in angular brackets is that we can use the same value of the variable at multiple places.
Am trying to extract a particular string in the below data.
I have to extract the observations mentioned in the data. There are various ways observations has been written, for ex : OBSERVATION, Observation, observed, OBSERVED ....
Please let me know how to extract this.
Data :
Preconditions :1)One valid navigation map should be installed on the MGU.2)One route must be active.\nActions/steps : 1)Press PTT button.\n2)Give voice command "Navigate to Alibaba Restaurant" and observe system\' s behavior.\n\nExpected result/behaviour:\n1) Confirmation prompt of given spoken command should be played. \n2)User shall get the list of POI\'s which are spoken by user for e.g. \n\n\nObserved result/behavior:\n1) Confirmation prompt of given spoken command is not played.\n2) User not able to select POI via speech commands.\n3)User getting the list of POI destination but user not able to select those point via spoken commands for e.g.