Need help, my question here is how can I code it such when the result is not expected testNG will display the test case as failure/fail? if the result is expected test case result is passed? very new to TestNG. my problem here is no matter how many times I run, the testNG result is PASSED.  public class TestNgbasic{  DesktopOptions option=new DesktopOptions();    @BeforeMethod public void setup() { //  DesktopOptions option=new DesktopOptions();  // Start your outlook session     option.setApplicationPath("C:\\Windows\\System32\\calc.exe");       }  @Test public void testcase1 () throws MalformedURLException, InterruptedException {     WiniumDriver driver=new WiniumDriver(new URL("http://localhost:9999"), option);     Thread.sleep(5000);     driver.findElement(By.name("Seven")).click();     driver.findElement(By.id("plusButton")).click();     driver.findElement(By.name("Eight")).click();     driver.findElement(By.id("equalButton")).click();     Thread.sleep(5000);     String result = driver.findElement(By.id("CalculatorResults")).getAttribute("Name");             if ("Display is 15".equals(result))     {         System.out.print("Pass");        }     else          System.out.print("Fail");    }      }
I know there is a difference between assert and verify in Junit; the assert results in a runtime exception, causing test method execution to abort. To overcome this problem, we can have verify which will make test case fail, but allowing test execution to proceed rather than getting aborted.  I doubt there is any such built in approach in testNG. I do understand that best practices say, there should not be multiple asserts in same test case.  But, in practical world, we do come across scenarios where we need to have multiple checkpoints in one test case and we don't want our test method to abort because of one check point failure (test execution should proceed despite failure).  How can we use a soft assert mechanism, similar to verify, which will not abort test method when there is a checkpoint failure.  Example:  @Test(dataProvider = "getMailUrl") public void testMail(email,subject); Assert.assertFalse(subject.isEmpty);//1st checkpoint Assert.assertNotNull(email); //2nd checkpoint Assert.assertEquals(email, "feedback@yoursite.com"); //3rd checkpoint   Now, I want test execution to proceed, even if the 1st checkpoint (validation of subject being not empty) fails. Definitely we will be not be using assert (hard assert). We will need concept of soft assert similar to verify (facilitated by Junit).   I understand, we have to build a customListener implementing TestNG interfaces or extending existing listeners such as TestListenerAdapter. I am still struggling - how can we do this?
Show that the rings $2\mathbb{Z}$ and $3\mathbb{Z}$ are not isomorphic. Where can I find a large palette / set of contrasting colors for coloring many datasets on a plot? I need large set (20 and more) of contrasted and easily visually-distinguishable colors for coloring different datasets on a scientific plot (the set of colors should not include white or black, and colors should be as bright as possible).   The plot is generated programmatically and intended to be included in a presentation which will be displayed using a projector.   Are there any ready-made sets of colors for such a task (I need colors as a set of RGB values)?   Or maybe there is some algorithm which generates such a set of colors programmatically (I use  for plot generation)?  P.S. The plot itself may look, for example, similar to this one: Find all integer roots of: $x^2(y-1)+y^2(x-1)=1$   Obviously $(2,1)$ and $(1,2)$ are two answers. But I was unable to manipulate the equation algebraically giving a useful form for finding all other possible answers! I also tried to view it as a quadratic equation in terms of $x$, but forming the Delta of that equation didn't help much other than if $y=1$ then certainly Delta would be a square and equation would have answer for $x$... How to access phpMyAdmin after installation? Get name of caller function in PHP? Is there a PHP function to find out the name of the caller function in a given function? Different probability density transformations due to Jacobian factor Windows 7 low and critical battery levels cannot be set lower than 10% Are there any good tools besides SeleniumRC that can fetch webpages including content post-painted by JavaScript? Almost universal class I so stuck with a problem of set theory. But first a recursive definition:   Define $R_0=\emptyset$ If $R_\alpha$ is defined, then $R_{\alpha+1}=\mathcal{P}(R_\alpha)$ (the power set). For a limit ordinal $\gamma$, if $R_\alpha$ is defined for all $\alpha&lt;\gamma$, then define $R_\gamma=\displaystyle\bigcup_{\alpha&lt;\gamma} R_\alpha$   We define $\text{BF}=\displaystyle\bigcup_{\alpha\in\text{OR}} R_\alpha$ (the class of well founded sets).  Next, my problem     Take $A\subseteq \text{BF}$ a proper transitive class such that $(A,\in)\models\text{ZF}$. Prove that $A$ is almost universal.    I think that the exercise is false because if it was true, then we could conclude that the strongly inaccessible cardinals doesn't exists. This because if $\kappa$ is strongly inaccessible then $R_\kappa$ satisfies the hypothesis but $R_\kappa$ isn't almost universal. I really appreciate any hint or/and suggestion.   Edit: my counterexample is wrong. But, then, how can I solve the exercise? Proving that expression is equivalent to the definition of derivative Let $f$ be differentiable at $x=a$.   Prove that if $x_n \to a^+$ and $y_n \to a^-$ then:  $$\lim_{n\to \infty} \frac{f(x_n)-f(y_n)}{x_n-y_n}=f'(a).$$  Every option that I think about seems to my very trivial, so I believe that I am doing something wrong.  Both numerator and denominator approach zero as $n\to\infty$ as the case of the formal definition of derivative, but it isn't guaranteed that the limits are equal (“$\frac{0}{0}$”).   Any direction? How to prove that $\lim\limits_{h \to 0} \frac{a^h - 1}{h} = \ln a$ I would like to know the purpose of nohup these days. I ask because I read this  Nohup is short for “No Hangups.” It’s not a command that you run by itself. Nohup is a supplemental command that tells the Linux system not to stop another command once it has started. That means it’ll keep running until it’s done, even if the user that started it logs out. The syntax for nohup is simple and looks something like this: nohup sh your-script.sh &amp; Notice the “&amp;” at the end of the command. That moves the command to the background, freeing up the terminal that you’re working in. Nohup works with just about any command that you run in the terminal. It can be run with custom scripts as well as standard system commands and command line utilities.  With using linux distributions such as SLES 11.4, or RHEL/CentOS 7.x, I can  remote log in to linux over the network via SSH run the simple program below, or any other, doing ./a.out &amp; log out of linux; type exit in the putty SSH terminal my sample program below, or any other including bash, csh, or tcsh shell scripts, run to completion just fine without the need for nohup typing exit in putty to close an SSH session, I would think that qualifies as a logout?  Is there any purpose or value with nouhup today?  Is it a kernel &gt;= 3.x thing? For however long I can remember (kernel &gt;= 2.6) I've never used nohup and have always just use &amp; with no problems. Can someone give me a practical scenario where nohup would be used? #include &lt;stdlib.h&gt; #include &lt;stdio.h&gt;  /*     sample C code, to print numbers to a file named zz.tmp     the numbers 0 to 29 over 30 seconds */  int main ( int argc, char *argv[] ) {    FILE *fp;    int i;     i = 0;    fp = fopen(&quot;zz.tmp&quot;, &quot;w&quot; );     while ( i &lt; 30 )    {       fprintf( fp, &quot;%d\n&quot;, i++ );       sleep( 1 );    }    fclose( fp );    return 0; }  mysleep.sh #!/bin/bash  sleep 1000  On Centos 7.7, optiplex pc login with keyboard &amp; mouse, my account is bash. I do nohup ./mysleep.sh and then control-z.  When typing jobs I see [1]+ Stopped nohup ./mysleep.sh A ps -ef | grep mysleep shows that process id existing, but if I close the terminal window via X in upper right corner, that process goes away so it seems nohup is not working? Strange behaviour of "ls -a | grep ^\." I wanted to list the content of a pwd and display only file starting with dot. I tried ls -a | grep ^\. but I cannot figure out why the output contains also the files which do not start with dot. For example:  Pictures .pip .pki .profile projects Public   I know that I can achieve what I want with ls -ld .* I am just curious about this behaviour of grep which I can't explain. Is there a way to "auto login" in PuTTY with a password? Is there a way to configure a password for a stored session in ?  I know there is the capability to specify an "auto-login username" (under Connection/Data), but is there a way to do the same with the password? Transitivity check vs. Transitive Closure Is checking transitivity of a digraph not easier than (in terms of asymptotic complexity) taking the transitive closure of the digraph? Do we know any lower bound better than $\Omega(n^2)$ to determine if a digraph is transitive or not? I'm using LyX and a custom class from  which is based on the  class.  I'm at another school and my advisor wants me to include titles of the readers on the signature page as well as a date line for each signator.  I've looked through some documentation on the thesis class and poked around in the .cls file in use but didn't come across anything obvious to change.  Perhaps this section would help though?  \newcommand*{\th@degreeyear}{\number\the\year} \newcommand*{\th@signature}[1]{ \begin{center}     \normalsize     \vspace*{16mm}  % works well?     \vrule width 80mm height 0.2mm\\     #1 \end{center} } \newcommand*{\th@dateline}{ \vspace*{9mm} \begin{flushright}     Date~{\vrule width 35mm height 0.2mm} \end{flushright}   How do I include this? How to check for an active Internet connection on iOS or macOS? If $0$ is the zero-object $ \Longrightarrow F(0) $ is the zero object when $F$ additive Why is complete strong induction a valid proof method and not need to explicitly proof the base cases? I have seen many camera review sites illustrate the effect of using different focal lengths on the same photograph using frames. There are also similar illustrations to compare different sensors (). I find this kind of visualization to be very useful in comparing the actual effect of the longer focal length\different sensor size. Of course the ability to do a wider focal length visualization would also be equally useful, but that's not possible.  Is there any ready-made software or plugin that enables this? If not, is there any simple technique to visualize the effect of longer focal lengths on an image (one would of course have to use the zoom information in the image EXIF data to accurately represent this)? All I can think of is to use some trigonometry to do the necessary calculations for the frame sizes for cropping.