A clear and concise description of what the bug is.
A clear and concise description of what you expected to happen.
What is the impact of this bug on the user, how critical is to fix? P0, P1 .. P4
def test_new_person_can_be_added(): | |
unique_last_name = create_new_person() | |
# After user is created, we read all the users and then use list comprehension to find if the | |
# created user is present in the response list | |
peoples = requests.get(BASE_URI).json() | |
is_new_user_created = search_created_user_in(peoples, unique_last_name) | |
assert_that(is_new_user_created).is_not_empty() | |
def create_new_person(): |
<configuration> | |
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder> | |
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> | |
</encoder> | |
</appender> | |
<root level="debug"> | |
<appender-ref ref="STDOUT" /> | |
</root> |
package experiments | |
import org.joda.time.DateTime | |
import org.testng.annotations.Test | |
object Wait { | |
fun until(function: () -> Boolean, timeout: Int = 30, retryAfter: Int = 2): Boolean { | |
val endAt = DateTime.now().plus(timeout.toLong() * 1000) |
import org.testng.Assert | |
import org.testng.annotations.Test | |
fun isPrime(num: Int): Boolean { | |
val end = kotlin.math.sqrt(num.toDouble()).toInt() | |
var i = 2 | |
while (i < end) { | |
if (num % i == 0) { | |
return false |
import core.logging.Logger | |
import redis.clients.jedis.Jedis | |
class RedisHandler(val host: String = "127.0.0.1", private val port: Int = 6379) { | |
private var jedis = Jedis(host, port) | |
private fun refreshConnection() { | |
jedis = Jedis(host, port) | |
} |
import turtle | |
from dataclasses import dataclass | |
@dataclass | |
class Point: | |
x: int | |
y: int | |
# install pipenv via homebrew | |
brew install pipenv | |
# Create a home directory | |
mkdir ~/.virtualenvs | |
# Add below in .zshrc or .bash_profile (if on mac/linux) or in your windows system variables | |
export WORKON_HOME=~/.virtualenvs | |
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3 | |
export LANG=en_US.UTF-8 |
plugins { | |
id 'java' | |
id 'org.jetbrains.kotlin.jvm' version '1.3.61' | |
} | |
... | |
sourceCompatibility = 1.8 | |
repositories { |
package testFrameworks.testNG.setupTearDown | |
import org.testng.Assert | |
import org.testng.annotations.BeforeMethod | |
import org.testng.annotations.DataProvider | |
import org.testng.annotations.Test | |
import java.util.concurrent.ThreadLocalRandom | |
enum class VehicleType() { | |
CAR, |