Skip to content

Instantly share code, notes, and snippets.

View saymowan's full-sized avatar
:bowtie:
...

Saymon Oliveira saymowan

:bowtie:
...
View GitHub Profile
it('Produtos - Excluir Produto Inexistente',()=>{
cy.deleteProdutos("xxx", true)
.then(response =>{
expect(response.status).to.equal(200)
expect(response.body.message).to.eq("Nenhum registro excluído")
})
})
it('Produtos - Excluir Produto Existente',()=>{
const produto ={
nome: faker.random.uuid(),
preco: faker.random.number(),
descricao: "Mouse bom",
quantidade: "5"
}
cy.postProdutos(produto)
//Prática alunos - mapeamento id
@Test
public void PraticaDivisaoDoisNumeros() throws IOException, InterruptedException {
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("platformName", "Android");
caps.setCapability("platformVersion", "9");
caps.setCapability("deviceName","Pixel_2_API_28");
caps.setCapability("appPackage","com.android.calculator2");
caps.setCapability("appActivity","com.android.calculator2.Calculator");
@saymowan
saymowan / docker-compose.yml
Created December 22, 2020 19:39
Docker Compose Selenium Grid
version: "3"
services:
hub:
image: selenium/hub
ports:
- "4444:4444"
environment:
GRID_MAX_SESSION: 16
node {
def mvnHome
stage('Step 1 - Preparation'){
git 'https://github.com/saymowan/bootcamplab.git'
}
stage('Step 2 - Docker Build'){
sh "sudo docker build -t myapp ."
}
using DataDriven_NetCore_NUnit.Helpers;
using NUnit.Framework;
namespace DataDriven_NetCore_NUnit
{
public class DataDrivenDataBaseTests
{
[TestCaseSource(typeof(DataDrivenHelpers),"ReturnDataUsingDataBase")]
public void UsingDataBaseSource(string name, string email)
public static List<TestCaseData> ReturnDataUsingDataBase()
{
var testcase = new List<TestCaseData>();
DataTable users = DataBaseHelpers.RetornaDadosDataTableQuery("SELECT * FROM `user`");
Console.WriteLine(users);
foreach(DataRow row in users.Rows)
{
testcase.Add(new TestCaseData(row[1].ToString(), row[2].ToString()));
}
using DataDriven_NetCore_NUnit.Helpers;
using NUnit.Framework;
namespace DataDriven_NetCore_NUnit
{
public class DataDrivenAPITests
{
[TestCaseSource(typeof(DataDrivenHelpers),"ReturnDataUsingAPI")]
public static List<TestCaseData> ReturnDataUsingAPI()
{
var testcase = new List<TestCaseData>();
var users = APIHelpers.GetUsersInfoAPI();
Console.WriteLine(users);
foreach (var user in users)
{
testcase.Add(new TestCaseData(user.first_name.ToString(), user.email.ToString()));
{
"page": 1,
"per_page": 6,
"total": 12,
"total_pages": 2,
"data": [
{
"id": 1,
"email": "george.bluth@reqres.in",
"first_name": "George",